From f3de712d7624d9385b098c6657a660fbce3c0aad Mon Sep 17 00:00:00 2001 From: Adrian Torres Date: Fri, 11 Jan 2019 16:03:44 +0000 Subject: [PATCH 01/30] [FIX] ir_model: add constraint on domain field Previous to this commit, if one were to create an ir.model.field with a poorly constructed domain (read: SyntaxError), the server would properly send an error message stating that an Error occurred, however this would be too late as the registry with the bad code would have already been reloaded, this meant that the registry would be left in an unstable state (read: crashed). With this commit, a constraint on the domain is added so that we confirm that the code in the domain field is properly constructed, thus no need to reload the registry and therefore no crash. closes odoo/odoo#30157 --- odoo/addons/base/ir/ir_model.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/odoo/addons/base/ir/ir_model.py b/odoo/addons/base/ir/ir_model.py index ec58bf422ac..fd63d0c590d 100644 --- a/odoo/addons/base/ir/ir_model.py +++ b/odoo/addons/base/ir/ir_model.py @@ -287,6 +287,11 @@ class IrModelFields(models.Model): raise UserError(_("The Selection Options expression is not a valid Pythonic expression." "Please provide an expression in the [('key','Label'), ...] format.")) + @api.constrains('domain') + def _check_domain(self): + for field in self: + safe_eval(field.domain or '[]') + @api.constrains('name', 'state') def _check_name(self): for field in self: From 169843d8d33bef60827a76f5f7cb8e5f6bcf1758 Mon Sep 17 00:00:00 2001 From: Filippo Iovine Date: Tue, 27 Nov 2018 11:35:45 +0000 Subject: [PATCH 02/30] [CLA] add Filippo Iovine to levelprime CCLA closes odoo/odoo#29072 --- doc/cla/corporate/levelprime.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/cla/corporate/levelprime.md b/doc/cla/corporate/levelprime.md index bca6d6aa7d9..d2d579302d8 100644 --- a/doc/cla/corporate/levelprime.md +++ b/doc/cla/corporate/levelprime.md @@ -9,9 +9,12 @@ declaration. Signed, Roberto Fichera roberto.fichera@levelprime.com https://github.com/robyf70 +Filippo Iovine - filippo.iovine@levelprime.com - https://github.com/FilippoIOVINE List of contributors: Roberto Fichera roberto.fichera@levelprime.com https://github.com/robyf70 Roberto Fichera robyf@tekno-soft.it https://github.com/robyf70 +Filippo Iovine - filippo.iovine@levelprime.com - https://github.com/FilippoIOVINE +Filippo Iovine - filippo.jovine@gmail.com - https://github.com/FilippoIOVINE From c45a4e8f835fd8d22af8941fd85e2b951f1e046b Mon Sep 17 00:00:00 2001 From: mreficent Date: Thu, 17 Jan 2019 13:43:41 +0000 Subject: [PATCH 03/30] [FIX] account: remove duplicated code https://github.com/odoo/odoo/commit/42e74aae51904955e725e4a96e39eb2bd60f3019 was a backport of https://github.com/odoo/odoo/commit/7544c22de9a4cea028ff8fe63931bf68573e0821, and thus generated a duplicated code. closes odoo/odoo#30318 --- addons/account/models/account_move.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 770728053d8..313ecf60572 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -255,9 +255,6 @@ class AccountMove(models.Model): reversed_move = ac_move._reverse_move(date=date, journal_id=journal_id) reversed_moves |= reversed_move - #unreconcile all lines reversed - aml = ac_move.line_ids.filtered(lambda x: x.account_id.reconcile or x.account_id.internal_type == 'liquidity') - aml.remove_move_reconcile() #reconcile together the reconciliable (or the liquidity aml) and their newly created counterpart for account in set([x.account_id for x in aml]): to_rec = aml.filtered(lambda y: y.account_id == account) From f965f3a861878c7a9c3e47dc3d1d990eb6bac76f Mon Sep 17 00:00:00 2001 From: liweijie0812 <674416404@qq.com> Date: Wed, 16 Jan 2019 15:56:06 +0000 Subject: [PATCH 04/30] [CLA] liweijie0812 signed CLA Cherry-pick from odoo/odoo#30278 --- doc/cla/individual/liweijie0812.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/liweijie0812.md diff --git a/doc/cla/individual/liweijie0812.md b/doc/cla/individual/liweijie0812.md new file mode 100644 index 00000000000..d13cbaf1dbd --- /dev/null +++ b/doc/cla/individual/liweijie0812.md @@ -0,0 +1,11 @@ +china, 2019-01-16 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +liweijie 674416404@qq.com https://github.com/liweijie0812 From 0c2e168f8e8e306de2703fdda473417baee56dc3 Mon Sep 17 00:00:00 2001 From: liweijie0812 <674416404@qq.com> Date: Wed, 16 Jan 2019 12:53:09 +0000 Subject: [PATCH 05/30] [FIX] account: return ShowPaymentLineWidget widget ShowPaymentLineWidget was unextendable closes odoo/odoo#30268 --- addons/account/static/src/js/account_payment_field.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/account/static/src/js/account_payment_field.js b/addons/account/static/src/js/account_payment_field.js index 1e5171e1f44..7d074a685c5 100644 --- a/addons/account/static/src/js/account_payment_field.js +++ b/addons/account/static/src/js/account_payment_field.js @@ -159,4 +159,8 @@ var ShowPaymentLineWidget = AbstractField.extend({ field_registry.add('payment', ShowPaymentLineWidget); +return { + ShowPaymentLineWidget: ShowPaymentLineWidget +}; + }); From cadefebd18d6001f9b9643d069d9e356f1e1f105 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 21 Jan 2019 10:11:32 +0000 Subject: [PATCH 06/30] [REM] doc: outdated intersphinx mappings ea6e7379a35e91f9ad064e5ad1e87c5177ea067b removed the few intersphinx refs to sqlalchemy & django, so these mappings have not been necessary in a year. This is especially annoying as the currently configured sqlalchemy mapping has been very flaky / regularly failing. Remove the mappings entirely. closes odoo/odoo#30397 --- doc/conf.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 8cafdc10a7c..55df2750a28 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -180,8 +180,6 @@ todo_include_todos = False intersphinx_mapping = { 'python': ('https://docs.python.org/3/', None), 'werkzeug': ('http://werkzeug.pocoo.org/docs/', None), - 'sqlalchemy': ('http://docs.sqlalchemy.org/en/rel_0_9/', None), - 'django': ('https://django.readthedocs.org/en/latest/', None), } github_user = 'odoo' From 6930f9c3536ff84abd7735b736bc02f1ae16d7ab Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Mon, 21 Jan 2019 11:38:32 +0000 Subject: [PATCH 07/30] [FIX] web_editor: restore less files edition Broken by https://github.com/odoo/odoo/pull/30186 closes odoo/odoo#30403 --- addons/web_editor/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index 3efadce2ba4..2a82e7276bf 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -387,7 +387,7 @@ class Web_Editor(http.Controller): (note: searching for the URL string is not enough as it could appear in a comment or an xpath expression.) """ - return bool(etree.XML(view.arch).xpath("link[@href='{}']".format(url))) + return bool(etree.XML(view.arch).xpath("//link[@href='{}']".format(url))) view_to_xpath = IrUiView.get_related_views(bundle_xmlid, bundles=True).filtered(views_linking_url) From 16b873c7714a4b81187dfb379e24d6bcc3c37d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Francisco=20Mart=C3=ADnez=20Salgado?= Date: Fri, 18 Jan 2019 21:13:06 +0000 Subject: [PATCH 08/30] [CLA] signature for xyvs closes odoo/odoo#30372 --- doc/cla/individual/xyvs.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/xyvs.md diff --git a/doc/cla/individual/xyvs.md b/doc/cla/individual/xyvs.md new file mode 100644 index 00000000000..8262dfb72a5 --- /dev/null +++ b/doc/cla/individual/xyvs.md @@ -0,0 +1,11 @@ +Mexico, 18-01-2018 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +José Francisco Martínez Salgado admin@jofranmtz.com https://github.com/xyvs From 102467ae235f86c68bb6dd295a220b4668863756 Mon Sep 17 00:00:00 2001 From: Nans Lefebvre Date: Tue, 22 Jan 2019 07:30:48 +0000 Subject: [PATCH 09/30] [FIX] sale: add force_save on product_uom in views Create a sale order. Confirm it. Add a new line. Change the UoM on this line. The onchange is applied, modifying the unit price. Save: the saved product UoM is the default one. So for example if the user changes the UoM from day to hours, he will sell one day for the price of one hour. This is because the field product_uom is set to read_only if the state of the sale order is confirmed ('sale') (as well as if the state is 'done' or 'cancel') However it is still possible to change it when adding a new line. opw 1923534 closes odoo/odoo#30420 --- addons/sale/views/sale_views.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index ceaad5477ee..79d353c4a85 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -261,6 +261,7 @@ context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'uom_qty_change':True, 'company_id': parent.company_id}" name="product_uom_qty" class="oe_inline"/>