Skip to content

Commit

Permalink
[ADD] fiscal document action
Browse files Browse the repository at this point in the history
  • Loading branch information
renatonlima committed Sep 18, 2020
1 parent 2e399d0 commit b642481
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion l10n_br_fiscal/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def action_create_return(self):
return_docs = self._create_return()

if return_docs:
action['domain'] = literal_eval(action['domain'])
action['domain'] = literal_eval(action['domain'] or '[]')
action['domain'].append(('id', 'in', return_docs.ids))

return action
Expand Down
18 changes: 18 additions & 0 deletions l10n_br_fiscal/views/l10n_br_fiscal_action.xml
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,24 @@
</field>
</record>

<record id="document_action" model="ir.actions.act_window">
<field name="name">Fiscal Document</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">l10n_br_fiscal.document</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="document_search"/>
<field name="view_id" ref="document_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new Document
</p><p>
Odoo helps you easily track all activities
related to a fiscal operation.
</p>
</field>
</record>

<!-- Fiscal Document In -->
<record id="document_nfe_in_action" model="ir.actions.act_window">
<field name="name">NF-e Receivement</field>
Expand Down

0 comments on commit b642481

Please sign in to comment.