File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ class AccountMove(models.Model):
1717 is_duplicated_invoice = fields .Boolean (
1818 compute = "_compute_is_duplicated_invoice" , store = False
1919 )
20+ show_fiscal_related_fields = fields .Boolean (
21+ compute = "_compute_show_fiscal_related_fields"
22+ )
23+
24+ def _compute_show_fiscal_related_fields (self ):
25+ for record in self :
26+ record .show_fiscal_related_fields = bool (record .company_id .fiscal_company )
2027
2128 def _compute_is_duplicated_invoice (self ):
2229 self .env .cr .execute (
Original file line number Diff line number Diff line change 2020 expr =" //group[@name='accounting_info_group']/field[@name='company_id']"
2121 position =" after"
2222 >
23- <field name =" must_be_duplicated" />
24- <field name =" duplicated_fiscal_invoice" />
23+ <field name =" show_fiscal_related_fields" invisible =" 1" />
24+ <field
25+ name =" must_be_duplicated"
26+ invisible =" not show_fiscal_related_fields"
27+ />
28+ <field
29+ name =" duplicated_fiscal_invoice"
30+ invisible =" not show_fiscal_related_fields"
31+ />
2532 </xpath >
2633 <xpath
2734 expr =" //group[@id='other_tab_entry_group']//field[@name='company_id']"
2835 position =" after"
2936 >
30- <field name =" must_be_duplicated" />
31- <field name =" duplicated_fiscal_invoice" />
37+ <field name =" show_fiscal_related_fields" invisible =" 1" />
38+ <field
39+ name =" must_be_duplicated"
40+ invisible =" not show_fiscal_related_fields"
41+ />
42+ <field
43+ name =" duplicated_fiscal_invoice"
44+ invisible =" not show_fiscal_related_fields"
45+ />
3246 </xpath >
3347 </field >
3448 </record >
You can’t perform that action at this time.
0 commit comments