[IMP] product: Keep expense and income accounts empty at product creation.
Problem --------- Before 16.2, the fields were empty, which meant that the expense and income accounts of the chosen category could be used. Since 16.2, when a product is created, the expense and income accounts are automatically pre-filled. Objective --------- This task aims at retrieving the old behavior to allow using category accounts. Solution --------- Remove the `property_account_expense_id` & `property_account_income_id keys` in `_get_xx_template_data` in all localization packages that define them. task-3438931 closes odoo/odoo#134796 X-original-commit: dae46c926d5e63683968107f06bf2bfb8e07d267 Signed-off-by: Quentin De Paoli <qdp@odoo.com> Signed-off-by: Antoine Boonen (aboo) <aboo@odoo.com>
This commit is contained in:
@@ -557,8 +557,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'property_account_payable_id': 'res.partner',
|
||||
'property_account_expense_categ_id': 'product.category',
|
||||
'property_account_income_categ_id': 'product.category',
|
||||
'property_account_expense_id': 'product.template',
|
||||
'property_account_income_id': 'product.template',
|
||||
'property_stock_journal': 'product.category',
|
||||
}.items():
|
||||
value = template_data.get(field)
|
||||
|
||||
@@ -21,8 +21,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'country': None,
|
||||
'property_account_receivable_id': 'receivable',
|
||||
'property_account_payable_id': 'payable',
|
||||
'property_account_expense_id': 'expense',
|
||||
'property_account_income_id': 'income',
|
||||
'property_account_expense_categ_id': 'expense',
|
||||
'property_account_income_categ_id': 'income',
|
||||
'property_stock_account_input_categ_id': 'stock_in',
|
||||
|
||||
@@ -15,8 +15,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'property_account_payable_id': 'l10n_bo_2121',
|
||||
'property_account_expense_categ_id': 'l10n_bo_53008',
|
||||
'property_account_income_categ_id': 'l10n_bo_4101',
|
||||
'property_account_expense_id': 'l10n_bo_53008',
|
||||
'property_account_income_id': 'l10n_bo_4101',
|
||||
'property_stock_account_input_categ_id': 'l10n_bo_11341',
|
||||
'property_stock_account_output_categ_id': 'l10n_bo_11342',
|
||||
'property_stock_valuation_account_id': 'l10n_bo_1131',
|
||||
|
||||
@@ -15,8 +15,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'property_account_payable_id': 'chart_cz_321000',
|
||||
'property_account_expense_categ_id': 'chart_cz_504000',
|
||||
'property_account_income_categ_id': 'chart_cz_604000',
|
||||
'property_account_expense_id': 'chart_cz_504000',
|
||||
'property_account_income_id': 'chart_cz_604000',
|
||||
'property_stock_account_input_categ_id': 'chart_cz_131000',
|
||||
'property_stock_account_output_categ_id': 'chart_cz_504000',
|
||||
'property_stock_valuation_account_id': 'chart_cz_132000',
|
||||
|
||||
@@ -11,8 +11,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
return {
|
||||
'property_account_receivable_id': 'dk_coa_5960',
|
||||
'property_account_payable_id': 'dk_coa_7180',
|
||||
'property_account_expense_id': 'dk_coa_1610',
|
||||
'property_account_income_id': 'dk_coa_1010',
|
||||
'property_account_expense_categ_id': 'dk_coa_1610',
|
||||
'property_account_income_categ_id': 'dk_coa_1010',
|
||||
'property_tax_payable_account_id': 'dk_coa_7840',
|
||||
|
||||
@@ -13,7 +13,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'property_account_payable_id': 'ec210301',
|
||||
'property_account_expense_categ_id': 'ec110307',
|
||||
'property_account_income_categ_id': 'ec410201',
|
||||
'property_account_expense_id': 'ec_expense_others',
|
||||
'property_stock_account_input_categ_id': 'ec110307',
|
||||
'property_stock_account_output_categ_id': 'ec510102',
|
||||
'property_stock_valuation_account_id': 'ec110306',
|
||||
|
||||
@@ -14,9 +14,7 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'property_account_payable_id': 'egy_account_201002',
|
||||
'property_account_expense_categ_id': 'egy_account_400028',
|
||||
'property_account_income_categ_id': 'egy_account_500001',
|
||||
'property_account_expense_id': 'egy_account_400028',
|
||||
'property_account_income_id': 'egy_account_500001',
|
||||
}
|
||||
}
|
||||
|
||||
@template('eg', 'res.company')
|
||||
def _get_eg_res_company(self):
|
||||
|
||||
@@ -14,9 +14,7 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'property_account_payable_id': 'account_2870',
|
||||
'property_account_expense_categ_id': 'account_4000',
|
||||
'property_account_income_categ_id': 'account_3000',
|
||||
'property_account_expense_id': 'account_4000',
|
||||
'property_account_income_id': 'account_3000',
|
||||
}
|
||||
}
|
||||
|
||||
@template('fi', 'res.company')
|
||||
def _get_fi_res_company(self):
|
||||
|
||||
@@ -12,8 +12,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'code_digits': '6',
|
||||
'property_account_receivable_id': 'l10n_jp_126000',
|
||||
'property_account_payable_id': 'l10n_jp_220000',
|
||||
'property_account_expense_id': 'l10n_jp_510000',
|
||||
'property_account_income_id': 'l10n_jp_410000',
|
||||
'property_account_expense_categ_id': 'l10n_jp_510000',
|
||||
'property_account_income_categ_id': 'l10n_jp_410000',
|
||||
'property_stock_valuation_account_id': 'l10n_jp_121100',
|
||||
|
||||
@@ -14,8 +14,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'property_account_payable_id': 'chart2400',
|
||||
'property_account_expense_categ_id': 'chart4000',
|
||||
'property_account_income_categ_id': 'chart3000',
|
||||
'property_account_expense_id': 'chart4300',
|
||||
'property_account_income_id': 'chart3000',
|
||||
'property_tax_payable_account_id': 'chart2740',
|
||||
'property_tax_receivable_account_id': 'chart2740',
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'property_account_receivable_id': 'chart1213',
|
||||
'property_account_payable_id': 'chart4212',
|
||||
'property_account_expense_categ_id': 'chart6329',
|
||||
'property_account_expense_id': 'chart6011',
|
||||
'property_account_income_categ_id': 'chart70121',
|
||||
'property_stock_account_input_categ_id': 'chart6111',
|
||||
'property_stock_account_output_categ_id': 'chart69111',
|
||||
|
||||
@@ -11,8 +11,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
return {
|
||||
'property_account_receivable_id': 'chart_2111',
|
||||
'property_account_payable_id': 'chart_2211',
|
||||
'property_account_expense_id': 'chart_311',
|
||||
'property_account_income_id': 'chart_711',
|
||||
'property_account_income_categ_id': 'chart_711',
|
||||
'property_account_expense_categ_id': 'chart_311',
|
||||
'property_tax_payable_account_id': 'chart_2436',
|
||||
|
||||
@@ -15,8 +15,6 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
'property_account_payable_id': 'chart_sk_321000',
|
||||
'property_account_expense_categ_id': 'chart_sk_504000',
|
||||
'property_account_income_categ_id': 'chart_sk_604000',
|
||||
'property_account_expense_id': 'chart_sk_504000',
|
||||
'property_account_income_id': 'chart_sk_604000',
|
||||
'property_stock_account_input_categ_id': 'chart_sk_131000',
|
||||
'property_stock_account_output_categ_id': 'chart_sk_504000',
|
||||
'property_stock_valuation_account_id': 'chart_sk_132000',
|
||||
|
||||
Reference in New Issue
Block a user