Skip to content

Commit

Permalink
Merge pull request #30 from Escodoo/12.0-epa_account_custom-change-do…
Browse files Browse the repository at this point in the history
…cument_number-visible

[12.0][IMP] epa_account_custom: change document_number visible
  • Loading branch information
marcelsavegnago committed Nov 17, 2023
2 parents d0c5360 + 68ed86b commit bae0e54
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion epa_account_custom/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"license": "AGPL-3",
"author": "Escodoo",
"website": "https://github.com/Escodoo/epa-addons",
"depends": ["payment"],
"depends": ["payment", "l10n_br_account"],
"data": [
"views/account_invoice.xml",
],
Expand Down
19 changes: 19 additions & 0 deletions epa_account_custom/views/account_invoice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,23 @@
</field>
</record>

<record model="ir.ui.view" id="invoice_form">
<field name="name">account.invoice.form (in epa_account_custom)</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="l10n_br_account.invoice_form" />
<field name="arch" type="xml">
<xpath
expr="//form/sheet/group/group/field[@name='document_number']"
position="replace"
>
<field
name="document_number"
readonly="0"
force_save="1"
attrs="{'invisible': [('document_type', '=', False)], 'required': [('issuer', '=', 'partner'), ('document_type_id', '!=', False)], 'readonly': [('state', '!=', 'draft')]}"
/>
</xpath>
</field>
</record>

</odoo>

0 comments on commit bae0e54

Please sign in to comment.