diff options
| author | Ankita Raval <anr@odoo.com> | 2019-10-30 06:11:02 +0000 |
|---|---|---|
| committer | Jigar Vaghela <jva@odoo.com> | 2020-02-19 09:09:20 +0000 |
| commit | d675dbaa4c7174591e0e7c1a3caf3e76877312ce (patch) | |
| tree | 40840df0a36cb9a6ba3b918835da2a40a07e3a3b /addons/l10n_cl | |
| parent | 8f6bf2087e50020bfad4e336b1d4c5a98a4fa84f (diff) | |
[IMP] account,* : Change type field to move_type in account.move
task-id: 2028z813
Diffstat (limited to 'addons/l10n_cl')
| -rw-r--r-- | addons/l10n_cl/models/account_move.py | 4 | ||||
| -rw-r--r-- | addons/l10n_cl/views/account_move_view.xml | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/addons/l10n_cl/models/account_move.py b/addons/l10n_cl/models/account_move.py index 215395c8036..5f3895dcb4c 100644 --- a/addons/l10n_cl/models/account_move.py +++ b/addons/l10n_cl/models/account_move.py @@ -18,7 +18,7 @@ class AccountMove(models.Model): domain = super()._get_l10n_latam_documents_domain() if (self.journal_id.l10n_latam_use_documents and self.journal_id.company_id.country_id == self.env.ref('base.cl')): - if self.type in ['in_invoice', 'in_refund']: + if self.move_type in ['in_invoice', 'in_refund']: if self.partner_id.l10n_cl_sii_taxpayer_type == '2': domain += [('code', '=', '71')] return domain @@ -28,7 +28,7 @@ class AccountMove(models.Model): domain += [('code', 'in', ['35', '38', '39', '41', '56', '61'])] return domain - @api.constrains('type', 'l10n_latam_document_type_id') + @api.constrains('move_type', 'l10n_latam_document_type_id') def _check_invoice_type_document_type(self): super()._check_invoice_type_document_type() for rec in self.filtered(lambda r: r.company_id.country_id == self.env.ref( diff --git a/addons/l10n_cl/views/account_move_view.xml b/addons/l10n_cl/views/account_move_view.xml index ecf9c7f8589..d1a7b745a51 100644 --- a/addons/l10n_cl/views/account_move_view.xml +++ b/addons/l10n_cl/views/account_move_view.xml @@ -10,7 +10,7 @@ <field name="l10n_latam_internal_type" invisible="1"/> </form> <field name="ref" position="attributes"> - <attribute name="attrs">{'invisible': [('type', '=', 'out_invoice'), ('l10n_latam_internal_type', '!=', 'debit_note')], 'required': [('l10n_latam_internal_type', '=', 'debit_note')]}</attribute> + <attribute name="attrs">{'invisible': [('move_type', '=', 'out_invoice'), ('l10n_latam_internal_type', '!=', 'debit_note')], 'required': [('l10n_latam_internal_type', '=', 'debit_note')]}</attribute> </field> </field> </record> @@ -27,7 +27,7 @@ <field name="invoice_date_due" optional="show"/> <field name="date" string="Accounting Date" optional="show"/> <field name="invoice_payment_ref" optional="hide"/> - <field name="invoice_user_id" optional="show" invisible="context.get('default_type') not in ('out_invoice', 'out_refund','out_receipt')" string="Sales Person"/> + <field name="invoice_user_id" optional="show" invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund','out_receipt')" string="Sales Person"/> <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" optional="show"/> <field name="invoice_origin" optional="show" string="Source Document"/> <field name="amount_untaxed_signed" string="Amount Untaxed" sum="Total" optional="show"/> @@ -38,7 +38,7 @@ <field name="company_currency_id" invisible="1"/> <field name="state" optional="show"/> <field name="payment_state" optional="hide"/> - <field name="type" invisible="context.get('default_type', True)"/> + <field name="move_type" invisible="context.get('default_move_type', True)"/> </tree> </field> </record> @@ -47,8 +47,8 @@ <field name="name">Sale Invoices and Credit Notes</field> <field name="view_id" ref="view_complete_invoice_refund_tree"/> <field name="res_model">account.move</field> - <field name="domain">[('type', 'in', ['out_invoice', 'out_refund'])]</field> - <field name="context">{'default_type': 'out_invoice'}</field> + <field name="domain">[('move_type', 'in', ['out_invoice', 'out_refund'])]</field> + <field name="context">{'default_move_type': 'out_invoice'}</field> <field name="target">current</field> <field name="view_mode">tree,form</field> </record> @@ -57,8 +57,8 @@ <field name="name">Vendor Bills and Refunds</field> <field name="view_id" ref="view_complete_invoice_refund_tree"/> <field name="res_model">account.move</field> - <field name="domain">[('type', 'in', ['in_invoice', 'in_refund'])]</field> - <field name="context">{'default_type': 'in_invoice'}</field> + <field name="domain">[('move_type', 'in', ['in_invoice', 'in_refund'])]</field> + <field name="context">{'default_move_type': 'in_invoice'}</field> <field name="target">current</field> <field name="view_mode">tree,form</field> </record> |
