Skip to content

Commit

Permalink
[IMP] l10n_br_account: add CT-e Menu and Action
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelsavegnago committed Dec 7, 2024
1 parent 6429733 commit 8c9901e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
39 changes: 39 additions & 0 deletions l10n_br_account/views/l10n_br_account_action.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,45 @@
<field name="act_window_id" ref="fiscal_invoice_nfse_action" />
</record>

<!-- CT-e Documents -->
<record id="fiscal_invoice_cte_action" model="ir.actions.act_window">
<field name="name">CT-e</field>
<field name="res_model">account.move</field>
<field name="view_mode">tree,kanban,form,pivot,graph,activity</field>
<field eval="False" name="view_id" />
<field
name="domain"
eval="[('document_type_id', '=', ref('l10n_br_fiscal.document_57'))]"
/>
<field
name="context"
eval="{'default_document_type_id': ref('l10n_br_fiscal.document_57')}"
/>
<field name="search_view_id" ref="l10n_br_account.fiscal_invoice_search" />
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new CT-e
</p><p>
Odoo helps you easily track all activities
related to a fiscal operation.
</p>
</field>
</record>

<record id="fiscal_invoice_cte_action_tree" model="ir.actions.act_window.view">
<field eval="1" name="sequence" />
<field name="view_mode">tree</field>
<field name="view_id" ref="fiscal_invoice_tree" />
<field name="act_window_id" ref="fiscal_invoice_cte_action" />
</record>

<record id="fiscal_invoice_cte_action_form" model="ir.actions.act_window.view">
<field eval="2" name="sequence" />
<field name="view_mode">form</field>
<field name="view_id" ref="fiscal_invoice_form" />
<field name="act_window_id" ref="fiscal_invoice_cte_action" />
</record>

<!-- Incomming Documents -->
<record id="fiscal_invoice_in_action" model="ir.actions.act_window">
<field name="name">Incomming Document</field>
Expand Down
7 changes: 6 additions & 1 deletion l10n_br_account/views/l10n_br_account_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
<field name="action" ref="fiscal_invoice_nfe_action" />
</record>

<!-- Incomming Documents -->
<!-- Incomming Documents -->
<record id="l10n_br_fiscal.document_nfse_menu" model="ir.ui.menu">
<field name="action" ref="fiscal_invoice_nfse_action" />
</record>

<!-- Incomming Documents -->
<record id="l10n_br_fiscal.document_cte_menu" model="ir.ui.menu">
<field name="action" ref="fiscal_invoice_cte_action" />
</record>

<!-- Incomming Documents -->
<record id="l10n_br_fiscal.document_in_menu" model="ir.ui.menu">
<field name="action" ref="fiscal_invoice_in_action" />
Expand Down

0 comments on commit 8c9901e

Please sign in to comment.