diff --git a/addons/account/__init__.py b/addons/account/__init__.py index dc3a8f3e476..35c6e44d75c 100644 --- a/addons/account/__init__.py +++ b/addons/account/__init__.py @@ -45,6 +45,8 @@ def _auto_install_l10n(cr, registry): 'PL', 'PT', 'RO', 'SI', 'TR', 'UK', 'VE', 'VN' ]: module_list.append('base_vat') + if country_code == 'MX': + module_list.append('l10n_mx_edi') # European countries will be using SEPA europe = env.ref('base.europe', raise_if_not_found=False) diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index 7f09875044e..7cee63c3122 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -257,11 +257,13 @@ class account_register_payments(models.TransientModel): ''' amount = self._compute_payment_amount(invoices=invoices) if self.multi else self.amount payment_type = ('inbound' if amount > 0 else 'outbound') if self.multi else self.payment_type + communication = (' '.join([inv.reference or inv.number for inv in invoices]) + if self.multi else self.communication) return { 'journal_id': self.journal_id.id, 'payment_method_id': self.payment_method_id.id, 'payment_date': self.payment_date, - 'communication': self.communication, + 'communication': communication, # DO NOT FORWARD PORT TO V12 OR ABOVE 'invoice_ids': [(6, 0, invoices.ids)], 'payment_type': payment_type, 'amount': abs(amount), diff --git a/addons/delivery/models/sale_order.py b/addons/delivery/models/sale_order.py index d0ca0a7c424..50da5d99eaa 100644 --- a/addons/delivery/models/sale_order.py +++ b/addons/delivery/models/sale_order.py @@ -99,9 +99,15 @@ class SaleOrder(models.Model): taxes_ids = self.fiscal_position_id.map_tax(taxes, carrier.product_id, self.partner_id).ids # Create the sales order line + carrier_with_partner_lang = carrier.with_context(lang=self.partner_id.lang) + if carrier_with_partner_lang.product_id.description_sale: + so_description = '%s: %s' % (carrier_with_partner_lang.name, + carrier_with_partner_lang.product_id.description_sale) + else: + so_description = carrier_with_partner_lang.name values = { 'order_id': self.id, - 'name': carrier.with_context(lang=self.partner_id.lang).name, + 'name': so_description, 'product_uom_qty': 1, 'product_uom': carrier.product_id.uom_id.id, 'product_id': carrier.product_id.id, diff --git a/addons/delivery/views/delivery_view.xml b/addons/delivery/views/delivery_view.xml index f0c867bce0f..e52d5e13e0a 100644 --- a/addons/delivery/views/delivery_view.xml +++ b/addons/delivery/views/delivery_view.xml @@ -93,7 +93,7 @@