Skip to content

Commit

Permalink
[MIG] l10n_pt_stock_invoicexpress: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dreispt committed Sep 19, 2024
1 parent 7413057 commit e7bbffa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion l10n_pt_stock_invoicexpress/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Portugal InvoiceXpress Legal Transport Documents",
"summary": "Portuguese legal transport and shipping documents"
" (Guias de Transporte e Guias de Remessa) generated with InvoiceXpress",
"version": "16.0.1.0.1",
"version": "17.0.1.0.0",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/l10n-portugal",
Expand Down
2 changes: 1 addition & 1 deletion l10n_pt_stock_invoicexpress/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def action_create_invoicexpress_delivery(self):
values1 = response1.json().get(doctype)
prefix = self._get_invoicexpress_prefix(doctype)
seqnum = values1["inverted_sequence_number"]
invx_number = "%s %s" % (prefix, seqnum)
invx_number = f"{prefix} {seqnum}"
delivery.invoicexpress_number = invx_number
delivery._update_invoicexpress_status()

Expand Down
14 changes: 5 additions & 9 deletions l10n_pt_stock_invoicexpress/views/stock_picking_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@
<field name="invoicexpress_doc_type" />
<field
name="invoicexpress_send_email"
attrs="{'invisible': [('can_invoicexpress_email', '=', False)]}"
/>
<field
name="license_plate"
attrs="{'invisible': [('can_invoicexpress', '=', False)]}"
invisible="not can_invoicexpress_email"
/>
<field name="license_plate" invisible="not can_invoicexpress_email" />
</field>
<xpath expr="//notebook//page[@name='note']" position="after">
<page
name="invoicexpress"
string="InvoiceXpress"
attrs="{'invisible': [('invoicexpress_id', '=', False)]}"
invisible="not can_invoicexpress_email"
groups="base.group_no_one"
>
<group>
Expand All @@ -38,8 +35,7 @@
name="action_create_invoicexpress_delivery"
string="Create InvoiceXpress"
type="object"
attrs="{'invisible': ['|', '|', ('invoicexpress_id', '!=', False),
('state', 'not in', ('assigned','done')),('can_invoicexpress', '=', False)]}"
invisible="invoicexpress_id or state not in ('assigned','done') or not can_invoicexpress"
groups="base.group_no_one"
/>
-->
Expand All @@ -48,7 +44,7 @@
name="action_send_invoicexpress_delivery"
string="InvoiceXpress Email"
type="object"
attrs="{'invisible': ['|', ('can_invoicexpress_email', '=', False), ('invoicexpress_id', '=', False)]}"
invisible="not can_invoicexpress_email or not invoicexpress_id"
/>
</xpath>
</field>
Expand Down

0 comments on commit e7bbffa

Please sign in to comment.