Skip to content
Snippets Groups Projects
Commit 2f1aaf8e authored by OCA Git Bot's avatar OCA Git Bot
Browse files

Merge remote-tracking branch 'odoo/14.0' into 14.0

parents 7a4497f8 7df724f1
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,14 @@ class IapAccount(models.Model): ...@@ -22,6 +22,14 @@ class IapAccount(models.Model):
account_token = fields.Char(default=lambda s: uuid.uuid4().hex) account_token = fields.Char(default=lambda s: uuid.uuid4().hex)
company_ids = fields.Many2many('res.company') company_ids = fields.Many2many('res.company')
@api.model
def create(self, vals):
account = super().create(vals)
if self.env['ir.config_parameter'].sudo().get_param('database.is_neutralized') and account.account_token:
# Disable new accounts on a neutralized database
account.account_token = f"{account.account_token.split('+')[0]}+disabled"
return account
@api.model @api.model
def get(self, service_name, force_create=True): def get(self, service_name, force_create=True):
domain = [ domain = [
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
t-att-class="'mr-1 fa fa-fw %s' % ('text-success fa-check-circle' if channel_progress[aside_slide.id].get('completed') else 'text-600 fa-circle')"> t-att-class="'mr-1 fa fa-fw %s' % ('text-success fa-check-circle' if channel_progress[aside_slide.id].get('completed') else 'text-600 fa-circle')">
</i> </i>
</div> </div>
<div class="o_wslides_lesson_link_name"> <div class="o_wslides_lesson_link_name text-truncate">
<t t-call="website_slides.slide_icon"> <t t-call="website_slides.slide_icon">
<t t-set="slide" t-value="aside_slide"/> <t t-set="slide" t-value="aside_slide"/>
</t> </t>
......
...@@ -92,7 +92,7 @@ class UpgradeHook(object): ...@@ -92,7 +92,7 @@ class UpgradeHook(object):
"""Makes the legacy `migrations` package being `odoo.upgrade`""" """Makes the legacy `migrations` package being `odoo.upgrade`"""
def find_module(self, name, path=None): def find_module(self, name, path=None):
if re.match(r"^odoo.addons.base.maintenance.migrations\b", name): if re.match(r"^odoo\.addons\.base\.maintenance\.migrations\b", name):
# We can't trigger a DeprecationWarning in this case. # We can't trigger a DeprecationWarning in this case.
# In order to be cross-versions, the multi-versions upgrade scripts (0.0.0 scripts), # In order to be cross-versions, the multi-versions upgrade scripts (0.0.0 scripts),
# the tests, and the common files (utility functions) still needs to import from the # the tests, and the common files (utility functions) still needs to import from the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment