diff options
| author | wan <wan@odoo.com> | 2019-08-06 07:02:07 +0000 |
|---|---|---|
| committer | wan <wan@odoo.com> | 2019-12-04 08:37:19 +0000 |
| commit | 30cf7bc798ddede8e610001146f4a76352aa582f (patch) | |
| tree | b7be7f8370a56e20b8b43caec56e861bcf89ef61 /addons/l10n_generic_coa | |
| parent | 363959784e7ed86973c03ab91e6b1976456e5104 (diff) | |
[IMP] account: add account.reconcile.model.line
Task 2046908
Instead of having all the fields duplicated with second_*, we have now a
o2m allowing us to
* have more than 2 lines
* reduce duplicated code
* fix bugs and add features at only one place
We also remove the computation of writeoff and suggestions from the
client side as some code was 4-upled before (twice in in client and
twice in server side). The logic is now only at one place.
closes odoo/odoo#38119
Related: odoo/enterprise#6324
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Diffstat (limited to 'addons/l10n_generic_coa')
| -rw-r--r-- | addons/l10n_generic_coa/demo/account_reconcile_model.xml | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/addons/l10n_generic_coa/demo/account_reconcile_model.xml b/addons/l10n_generic_coa/demo/account_reconcile_model.xml index 3be9c3a1bde..5934fdd0ebc 100644 --- a/addons/l10n_generic_coa/demo/account_reconcile_model.xml +++ b/addons/l10n_generic_coa/demo/account_reconcile_model.xml @@ -6,20 +6,29 @@ <field name="rule_type">writeoff_suggestion</field> <field name="match_label">contains</field> <field name="match_label_param">BRT</field> + <field name="decimal_separator">,</field> + </record> + + <record id="reconcile_from_label_line1" model="account.reconcile.model.line"> + <field name="model_id" ref="l10n_generic_coa.reconcile_from_label"/> + <field name="sequence">1</field> <field name="label">Due amount</field> <field name="account_id" model="account.account" search="[('user_type_id', '=', ref('account.data_account_type_revenue')), ('company_id', '=', obj().env.company.id)]"/> <field name="amount_type">regex</field> - <field name="amount_from_label_regex">BRT: ([\d,]+)</field> - <field name="decimal_separator">,</field> - <field name="has_second_line" eval="True"/> - <field name="second_label">Bank Fees</field> - <field name="second_account_id" model="account.account" + <field name="amount_string">BRT: ([\d,]+)</field> + </record> + + <record id="reconcile_from_label_line2" model="account.reconcile.model.line"> + <field name="model_id" ref="l10n_generic_coa.reconcile_from_label"/> + <field name="sequence">2</field> + <field name="label">Bank Fees</field> + <field name="account_id" model="account.account" search="[('user_type_id', '=', ref('account.data_account_type_direct_costs')), ('company_id', '=', obj().env.company.id)]"/> - <field name="second_amount_type">percentage</field> - <field name="second_amount">100</field> + <field name="amount_type">percentage</field> + <field name="amount_string">100</field> </record> </data> </odoo> |
