diff --git a/addons/account/__init__.py b/addons/account/__init__.py
index 866c39de02e..86d81923e02 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_invoice.py b/addons/account/models/account_invoice.py
index 2974c2119c9..9a8887ebeb0 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -743,7 +743,7 @@ class AccountInvoice(models.Model):
# Subscribe internal users on the newly created bill
partners = self.env['res.partner'].browse(seen_partner_ids)
is_internal = lambda p: (p.user_ids and
- all(p.user_ids.mapped(lambda u: u.user_has_groups('base.group_user'))))
+ all(p.user_ids.mapped(lambda u: u.has_group('base.group_user'))))
partners_to_subscribe = partners.filtered(is_internal)
if partners_to_subscribe:
invoice.message_subscribe([p.id for p in partners_to_subscribe])
diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py
index dfc2b605790..034cdab484d 100644
--- a/addons/account/models/account_payment.py
+++ b/addons/account/models/account_payment.py
@@ -87,6 +87,16 @@ class account_abstract_payment(models.AbstractModel):
# Check all invoices have the same currency
if any(inv.currency_id != invoices[0].currency_id for inv in invoices):
raise UserError(_("In order to pay multiple invoices at once, they must use the same currency."))
+ # Check if, in batch payments, there are not negative invoices and positive invoices
+ dtype = invoices[0].type
+ for inv in invoices[1:]:
+ if inv.type != dtype:
+ if ((dtype == 'in_refund' and inv.type == 'in_invoice') or
+ (dtype == 'in_invoice' and inv.type == 'in_refund')):
+ raise UserError(_("You cannot register payments for vendor bills and supplier refunds at the same time."))
+ if ((dtype == 'out_refund' and inv.type == 'out_invoice') or
+ (dtype == 'out_invoice' and inv.type == 'out_refund')):
+ raise UserError(_("You cannot register payments for customer invoices and credit notes at the same time."))
# Look if we are mixin multiple commercial_partner or customer invoices with vendor bills
multi = any(inv.commercial_partner_id != invoices[0].commercial_partner_id
diff --git a/addons/account/models/res_users.py b/addons/account/models/res_users.py
index ab85e359d22..8030423e74d 100644
--- a/addons/account/models/res_users.py
+++ b/addons/account/models/res_users.py
@@ -14,8 +14,8 @@ class Users(models.Model):
super(Users, self)._check_one_user_type()
users_with_both_groups = self.filtered(lambda user:
- user.user_has_groups('account.group_show_line_subtotals_tax_included') and
- user.user_has_groups('account.group_show_line_subtotals_tax_excluded')
+ user.has_group('account.group_show_line_subtotals_tax_included') and
+ user.has_group('account.group_show_line_subtotals_tax_excluded')
)
if users_with_both_groups:
names = ", ".join(users_with_both_groups.mapped('name'))
diff --git a/addons/account/security/account_security.xml b/addons/account/security/account_security.xml
index b7ec99e56c0..648dc59f1c3 100644
--- a/addons/account/security/account_security.xml
+++ b/addons/account/security/account_security.xml
@@ -59,6 +59,17 @@
Add a new payment method
diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml
index 79430121c45..f4f88c5dfb2 100644
--- a/addons/portal/views/portal_templates.xml
+++ b/addons/portal/views/portal_templates.xml
@@ -174,7 +174,7 @@
-
@@ -479,8 +479,8 @@
-
-
+
+
Subtotal
diff --git a/addons/sale_management/controllers/portal.py b/addons/sale_management/controllers/portal.py
index 9547d8e182b..1796beb7223 100644
--- a/addons/sale_management/controllers/portal.py
+++ b/addons/sale_management/controllers/portal.py
@@ -1,7 +1,10 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
+from functools import partial
+
from odoo import http
+from odoo.tools import formatLang
from odoo.exceptions import AccessError, MissingError
from odoo.http import request
from odoo.addons.sale.controllers.portal import CustomerPortal
@@ -11,6 +14,13 @@ class CustomerPortal(CustomerPortal):
@http.route(['/my/orders/ Writer
diff --git a/addons/website_livechat/models/__init__.py b/addons/website_livechat/models/__init__.py
index 13835e02e09..18f7d71a23d 100644
--- a/addons/website_livechat/models/__init__.py
+++ b/addons/website_livechat/models/__init__.py
@@ -2,4 +2,5 @@
from . import im_livechat
from . import website
-from . import res_config_settings
\ No newline at end of file
+from . import res_config_settings
+from . import ir_http
diff --git a/addons/website_livechat/models/ir_http.py b/addons/website_livechat/models/ir_http.py
new file mode 100644
index 00000000000..baeab9ea57e
--- /dev/null
+++ b/addons/website_livechat/models/ir_http.py
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import api, fields, models
+from odoo.osv import expression
+
+
+class IrHttp(models.AbstractModel):
+ _inherit = 'ir.http'
+
+ @classmethod
+ def _get_translation_frontend_modules_domain(cls):
+ domain = super(IrHttp, cls)._get_translation_frontend_modules_domain()
+ return expression.OR([domain, [('name', '=', 'im_livechat')]])
+
diff --git a/addons/website_livechat/views/website_livechat.xml b/addons/website_livechat/views/website_livechat.xml
index e5f429fc806..493de2d9cdb 100644
--- a/addons/website_livechat/views/website_livechat.xml
+++ b/addons/website_livechat/views/website_livechat.xml
@@ -167,19 +167,21 @@
-
-
-
+
+
+