This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git l10n_uk_reports/models/hmrc_service.py l10n_uk_reports/models/hmrc_service.py | |
index c1927802e68..e5fe7db0a97 100644 | |
--- l10n_uk_reports/models/hmrc_service.py | |
+++ l10n_uk_reports/models/hmrc_service.py | |
@@ -129,7 +129,7 @@ class HmrcService(models.AbstractModel): | |
if remote_needed: #no need when on a private network | |
gov_dict['Gov-Client-Public-IP'] = urls.url_quote(remote_address) | |
gov_dict['Gov-Client-Public-Port'] = urls.url_quote(str(environ.get('REMOTE_PORT'))) | |
- if self.env.user.totp_enabled: | |
+ if 'totp_enabled' in self.env.user._fields and self.env.user.totp_enabled: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH fk_actions ( code, action ) AS ( | |
VALUES ( 'a', 'error' ), | |
( 'r', 'restrict' ), | |
( 'c', 'cascade' ), | |
( 'n', 'set null' ), | |
( 'd', 'set default' )), | |
fk_list AS ( | |
SELECT pg_constraint.oid as fkoid, conrelid, confrelid as parentid, | |
conname, relname, nspname, | |
fk_actions_update.action as update_action, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git addons/website_sale/controllers/main.py addons/website_sale/controllers/main.py | |
index b5bdc26c9a3..e24977212c4 100644 | |
--- addons/website_sale/controllers/main.py | |
+++ addons/website_sale/controllers/main.py | |
@@ -384,7 +384,7 @@ class WebsiteSale(http.Controller): | |
revive: Revival method when abandoned cart. Can be 'merge' or 'squash' | |
""" | |
order = request.website.sale_get_order() | |
- if order and order.state != 'draft': | |
+ if order and not order.is_cart_editable: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import tempfile | |
import os | |
def curl_to_ab(curl_cmd, num=200, cur=4): | |
""" | |
Translate a cURL command created by Chrome's developer tools into a | |
command for ``ab``, the ApacheBench HTTP benchmarking tool. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git odoo/modules/registry.py odoo/modules/registry.py | |
index 907e13ef4ae5..c3c317b77f0d 100644 | |
--- odoo/modules/registry.py | |
+++ odoo/modules/registry.py | |
@@ -616,7 +616,6 @@ class Registry(Mapping): | |
if self.cache_sequence != c: | |
_logger.info("Invalidating all model caches after database signaling.") | |
self._clear_cache() | |
- self.cache_invalidated = False | |
if self.cache_longterm_sequence != cl: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this in an odoo shell command, assuming you can still start a shell on the broken database | |
# repair the ir.action* table structure | |
env.registry.init_models(env.cr, ['ir.actions.actions', 'ir.actions.act_window', | |
'ir.actions.server', 'ir.actions.act_url', | |
'ir.actions.client', 'ir.actions.report'], {}) | |
# re-allow name constraint | |
env.cr.execute("update ir_actions set name = 'action ' || id where name is null"); | |
# repair constraint again | |
env.registry.init_models(env.cr, ['ir.actions.actions', 'ir.actions.act_window', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Part of Odoo. See LICENSE file for full copyright and licensing details. | |
from odoo import fields, models, api, _ | |
from odoo.exceptions import UserError | |
class StockPutawayRule(models.Model): | |
_name = 'stock.putaway.rule' | |
_order = 'sequence,product_id' | |
_description = 'Putaway Rule' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git odoo/addons/base/models/decimal_precision.py odoo/addons/base/models/decimal_precision.py | |
index c1d00611d43..1bd34a804ce 100644 | |
--- odoo/addons/base/models/decimal_precision.py | |
+++ odoo/addons/base/models/decimal_precision.py | |
@@ -2,8 +2,10 @@ | |
# Part of Odoo. See LICENSE file for full copyright and licensing details. | |
from odoo import api, fields, models, tools | |
+import odoo.addons | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git sign/controllers/main.py sign/controllers/main.py | |
index c535bff..217e888 100644 | |
--- sign/controllers/main.py | |
+++ sign/controllers/main.py | |
@@ -258,8 +258,10 @@ class Sign(http.Controller): | |
return False | |
# mark signature as done in next activity | |
- user_id = http.request.env['res.users'].search([('partner_id', '=', request_item.partner_id.id)]).id | |
- request_item.sign_request_id.activity_feedback(['mail.mail_activity_data_todo'], user_id=user_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import decimal | |
import odoo | |
from odoo.tools import float_utils | |
from decimal import Decimal | |
# Version 0: BROKEN because float_round does not return the float with the shortest | |
# representation, so it will serialize as 211.70000000000002. | |
d = {'foo': float_utils.float_round(211.7, 1)} |
NewerOlder