From 3c8b57dc53f8e06c8985963d72eaffe5ded17039 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 29 Nov 2018 09:56:43 +0000 Subject: [PATCH 01/18] [FIX] sale_stock, stock: Wrong dependency The field sale_id on model stock.picking is not defined in stock module. So the rule was wrong when sale_stock was uninstalled. opw:1912564 closes odoo/odoo#29145 --- addons/sale_stock/security/sale_stock_security.xml | 8 ++++++++ addons/stock/security/stock_security.xml | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/sale_stock/security/sale_stock_security.xml b/addons/sale_stock/security/sale_stock_security.xml index 630a6512b2d..c53b98a341d 100644 --- a/addons/sale_stock/security/sale_stock_security.xml +++ b/addons/sale_stock/security/sale_stock_security.xml @@ -10,5 +10,13 @@ Display incoterms on Sales Order and related invoices + + + + Portal Follower Pickings + + ['|', '|', ('message_partner_ids', 'in', [user.partner_id.id]), ('partner_id', '=', user.partner_id.id), ('sale_id.partner_id', '=', user.partner_id.id)] + + diff --git a/addons/stock/security/stock_security.xml b/addons/stock/security/stock_security.xml index 3301a5fbb8c..5a61d942114 100644 --- a/addons/stock/security/stock_security.xml +++ b/addons/stock/security/stock_security.xml @@ -134,14 +134,6 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] - - - Portal Follower Pickings - - ['|', '|', ('message_partner_ids', 'in', [user.partner_id.id]), ('partner_id.id', '=', user.partner_id.id), ('sale_id.partner_id.id', '=', user.partner_id.id)] - - - stock_location_route multi-company From 4e37ce885581a806f1449c874d16b9373b0f4f07 Mon Sep 17 00:00:00 2001 From: Florent de Labarre Date: Mon, 26 Nov 2018 13:41:47 +0000 Subject: [PATCH 02/18] [FIX] project: remove unused field If `description` contains an image, the loading time of the kanban view can be rather long. Since the field is not even used in the view, it can be removed. opw-1915193 closes odoo/odoo#29034 --- addons/project/views/project_views.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml index e3b268ac320..97a8b62bc93 100644 --- a/addons/project/views/project_views.xml +++ b/addons/project/views/project_views.xml @@ -480,7 +480,6 @@ - From 0246887f7b51c8bb501f41df35b3c8a40d04b22d Mon Sep 17 00:00:00 2001 From: Wolfgang Taferner Date: Tue, 13 Nov 2018 13:37:22 +0000 Subject: [PATCH 03/18] [FIX] account: wrong default journal based on type available in vals As the journal is mostly set in the Odoo world the _default_journal method is not needed during create, but in case you only have partner_id, account_id and type in vals you will have retrieved a wrong journal in case you have an incoming invoice. closes odoo/odoo#28635 --- addons/account/models/account_invoice.py | 3 +++ addons/account/tests/test_account_supplier_invoice.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 1bb091cd849..0da8e8c51e8 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -447,6 +447,9 @@ class AccountInvoice(models.Model): @api.model def create(self, vals): + if not vals.get('journal_id') and vals.get('type'): + vals['journal_id'] = self.with_context(type=vals.get('type'))._default_journal().id + onchanges = { '_onchange_partner_id': ['account_id', 'payment_term_id', 'fiscal_position_id', 'partner_bank_id'], '_onchange_journal_id': ['currency_id'], diff --git a/addons/account/tests/test_account_supplier_invoice.py b/addons/account/tests/test_account_supplier_invoice.py index 357ac04f8f2..e28a4b4f893 100644 --- a/addons/account/tests/test_account_supplier_invoice.py +++ b/addons/account/tests/test_account_supplier_invoice.py @@ -21,6 +21,7 @@ class TestAccountSupplierInvoice(AccountingTestCase): 'account_id': invoice_account, 'type': 'in_invoice', }) + self.assertEquals(invoice.journal_id.type, 'purchase') self.env['account.invoice.line'].create({'product_id': self.env.ref('product.product_product_4').id, 'quantity': 1.0, @@ -76,6 +77,7 @@ class TestAccountSupplierInvoice(AccountingTestCase): 'account_id': invoice_account, 'type': 'in_invoice', }) + self.assertEquals(invoice.journal_id.type, 'purchase') invoice_line = self.env['account.invoice.line'].create({'product_id': self.env.ref('product.product_product_4').id, 'quantity': 5.0, From e97e41f2e30843b52a5c6529b07f32e8eb3e43b3 Mon Sep 17 00:00:00 2001 From: "Julien (juc) Castiaux" Date: Tue, 4 Dec 2018 15:00:50 +0000 Subject: [PATCH 04/18] [FIX] account: change reconciliation journal to a non-reconciliable Changing the journal of a reconcialiation model to a journal not reconciliable resulted to the model not accessible from any menu. opw-1913079 closes odoo/odoo#29249 --- addons/account/views/account_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index e823f4d7774..2fd44c0b155 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -855,7 +855,7 @@