Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][IMP] delivery_gls_asm: Notas envío GLS #3223

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>