Skip to content

Commit

Permalink
[IMP] delivery_gls_asm: Notas envío GLS
Browse files Browse the repository at this point in the history
  • Loading branch information
hildickethan committed Sep 18, 2023
1 parent ab9cf3c commit d0c3e08
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion delivery_gls_asm/models/delivery_carrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def _prepare_gls_asm_shipping(self, picking):
"destinatario_email": escape(
consignee.email or consignee_entity.email or ""
),
"destinatario_observaciones": "",
"destinatario_observaciones": picking.gls_shipping_notes or "",
"destinatario_att": "",
"destinatario_departamento": "",
"destinatario_nif": "",
Expand Down
1 change: 1 addition & 0 deletions delivery_gls_asm/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class StockPicking(models.Model):
],
copy=False,
)
gls_shipping_notes = fields.Text(string="Notas de envío GLS")

def gls_asm_get_label(self):
"""Get GLS Label for this picking expedition"""
Expand Down
19 changes: 19 additions & 0 deletions delivery_gls_asm/views/stock_picking_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,23 @@
</xpath>
</field>
</record>
<record id="view_picking_gls_form" model="ir.ui.view">
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='note']" position="after">
<field
name="gls_shipping_notes"
placeholder="Notas para GLS"
attrs="{
'invisible': [
'|',
('gls_carrier_is_pickup_service', '=', True),
('delivery_type', '!=', 'gls_asm')
]
}"
/>
</xpath>
</field>
</record>
</odoo>

0 comments on commit d0c3e08

Please sign in to comment.