|
@@ -63,7 +63,7 @@ class Purchases(http.Controller):
|
|
|
'name': journal.currency.name,
|
|
|
'displayName': journal.currency.display_name
|
|
|
},
|
|
|
- 'creditAccount': {
|
|
|
+ 'defaultCreditAccount': {
|
|
|
'id': journal.default_credit_account_id.id,
|
|
|
'name': journal.default_credit_account_id.name,
|
|
|
'displayName': journal.default_credit_account_id.display_name,
|
|
@@ -85,7 +85,7 @@ class Purchases(http.Controller):
|
|
|
'displayName': journal.default_credit_account_id.currency_id.display_name
|
|
|
},
|
|
|
},
|
|
|
- 'debitAccount': {
|
|
|
+ 'defaultDebitAccount': {
|
|
|
'id': journal.default_debit_account_id.id,
|
|
|
'name': journal.default_debit_account_id.name,
|
|
|
'displayName': journal.default_debit_account_id.display_name,
|
|
@@ -108,7 +108,7 @@ class Purchases(http.Controller):
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- } for journal in request.env['account.journal'].search([('type', 'in', ['bank', 'cash']), ('active', '=', True)])]
|
|
|
+ } for journal in request.env['account.journal'].search([('type', 'in', ['bank', 'cash']), ('default_debit_account_id.currency_id', '=', False), ('active', '=', True)], order='id')]
|
|
|
|
|
|
'''
|
|
|
Get all active suppliers
|
|
@@ -134,6 +134,7 @@ class Purchases(http.Controller):
|
|
|
'displayName': product.display_name,
|
|
|
'ean13': product.ean13,
|
|
|
'imageMedium': product.image_medium,
|
|
|
+ 'listPrice': product.list_price,
|
|
|
'variantCount': product.product_variant_count,
|
|
|
'variants': [{
|
|
|
'id': variant.id,
|