From 543f75f46e47e7064492270e515875a6cc156b3c Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 2 Jun 2016 15:26:52 +0200 Subject: [PATCH 1/9] [FIX] product_extended: traceback on `bom_count` The field `bom_count` is added in the view for group `group_mrp_user`. Therefore when extending the view, we should make sure to restrict the access as well. opw-679172 --- addons/product_extended/product_extended_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_extended/product_extended_view.xml b/addons/product_extended/product_extended_view.xml index 1428d2e7293..f9b6a85bc6e 100644 --- a/addons/product_extended/product_extended_view.xml +++ b/addons/product_extended/product_extended_view.xml @@ -6,6 +6,7 @@ product.template 3 +
- From 30f06fd39e856a97c5aed7cff461e1bb207232bc Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 2 Jun 2016 16:02:48 +0200 Subject: [PATCH 3/9] [FIX] website_forum: convert content of posted comment to plaintext HTML content should be escaped before being sanitized. Any content (link, image, code,...) that is acceptable in usual mail.message but should not be interprated when posted on a comment of the forum. Fixes #3737 --- addons/website_forum/controllers/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index 4323e03720f..95a8062e37b 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -347,9 +347,10 @@ class WebsiteForum(http.Controller): cr, uid, context = request.cr, request.uid, request.context if kwargs.get('comment') and post.forum_id.id == forum.id: # TDE FIXME: check that post_id is the question or one of its answers + body = tools.mail.plaintext2html(kwargs['comment']) request.registry['forum.post'].message_post( cr, uid, post.id, - body=kwargs.get('comment'), + body=body, type='comment', subtype='mt_comment', context=dict(context, mail_create_nosubscribe=True)) From 2779d463e80eaf903e789c29991a1faef8d07445 Mon Sep 17 00:00:00 2001 From: "Adrien Peiffer (ACSONE)" Date: Thu, 2 Jun 2016 17:33:21 +0200 Subject: [PATCH 4/9] [FIX] l10n_lu: Change the sign for VP-IC-EX. Was PR #12041 --- addons/l10n_lu/account.tax.template-2015.csv | 2 +- addons/l10n_lu/scripts/tax.xls | Bin 259072 -> 259072 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_lu/account.tax.template-2015.csv b/addons/l10n_lu/account.tax.template-2015.csv index b3f8ec1316e..e1181aaa04d 100644 --- a/addons/l10n_lu/account.tax.template-2015.csv +++ b/addons/l10n_lu/account.tax.template-2015.csv @@ -395,7 +395,7 @@ lu_2011_tax_VB-PA-Tab,Vente Biens Tabacs - Pays,VB-PA-Tab,sale,percent,0.0,0,,,, lu_2015_tax_VB-TR-0,Vente Biens – Triangulaire Intracommunautaire,VB-TR-0,sale,percent,0.0,0,,,,1.0,,lu_tax_code_template_b_VB-TR-0,,-1.0,,lu_tax_code_template_b_VB-TR-0,,lu_2011_chart_1,494 lu_2011_tax_VP-EC-0,Vente Prestations - Extracommunautaire,VP-EC-0,sale,percent,0.0,0,,,,1.0,1.0,lu_tax_code_template_b_VP-EC-0,,-1.0,-1.0,lu_tax_code_template_b_VP-EC-0,,lu_2011_chart_1,495 lu_2011_tax_VP-IC-0,Vente Prestations - Intracommunautaire,VP-IC-0,sale,percent,0.0,0,,,,1.0,1.0,lu_tax_code_template_b_VP-IC-0,,-1.0,-1.0,lu_tax_code_template_b_VP-IC-0,,lu_2011_chart_1,496 -lu_2011_tax_VP-IC-EX,Vente Prestations - Intracommunautaire exonérées dans l'état membre,VP-IC-EX,sale,percent,0.0,0,,,,-1.0,-1.0,lu_tax_code_template_b_VP-IC-EX,,-1.0,-1.0,lu_tax_code_template_b_VP-IC-EX,,lu_2011_chart_1,497 +lu_2011_tax_VP-IC-EX,Vente Prestations - Intracommunautaire exonérées dans l'état membre,VP-IC-EX,sale,percent,0.0,0,,,,1.0,1.0,lu_tax_code_template_b_VP-IC-EX,,-1.0,-1.0,lu_tax_code_template_b_VP-IC-EX,,lu_2011_chart_1,497 lu_2011_tax_VP-PA-0,Vente Prestations 0% - Pays,VP-PA-0,sale,percent,0.0,0,,,,1.0,1.0,lu_tax_code_template_b_VP-PA-0,,-1.0,-1.0,lu_tax_code_template_b_VP-PA-0,,lu_2011_chart_1,498 lu_2011_tax_VP-PA-12,Vente Prestations 12% - Pays,VP-PA-12,sale,percent,0.12,0,,lu_2011_account_4614111,lu_2011_account_4614111,1.0,1.0,lu_tax_code_template_b_VP-PA-12,lu_tax_code_template_t_VP-PA-12,-1.0,-1.0,lu_tax_code_template_b_VP-PA-12,lu_tax_code_template_t_VP-PA-12,lu_2011_chart_1,499 lu_2015_tax_VP-PA-14,Vente Prestations 14% - Pays,VP-PA-14,sale,percent,0.14,0,,lu_2011_account_4614111,lu_2011_account_4614111,1.0,1.0,lu_tax_code_template_b_VP-PA-14,lu_tax_code_template_t_VP-PA-14,-1.0,-1.0,lu_tax_code_template_b_VP-PA-14,lu_tax_code_template_t_VP-PA-14,lu_2011_chart_1,500 diff --git a/addons/l10n_lu/scripts/tax.xls b/addons/l10n_lu/scripts/tax.xls index a807833848f47d1b1f8835127449539c15a196fe..0a3a0182728c35c19fbb410137fe391ee44f7f9b 100644 GIT binary patch delta 2205 zcmaLZeN0t#9LMqVJ4cc1T!G|56GR5)%Zi0$Ea4+P_ z6kQnMkIDk7mH)K4wfeOlO(n5>7$rtx2}Oklj%sVPVRr8Cea~t96YSjA+4u83zu))X zbGetA{)C$TgoEeeMCZHRaYx6BtcDhQqG)e;&rY-ahJSmvt-5WoIV&~AFb%_qi#`}* zq7V8kdSVn+Y$;WtT(Mus^I;J$5AC+b$TMM)C@k3#7Rj>yh+7y-A#sme7)PPU>$rx( zs%VE=D2DZtVv4ScsWRJHPfUaBU^>iz6qu>;r8;9yHZnwXOut&QNHqH8ZO)8h7Ht7Y zgLJ)%df;JaboQOcG=-~w9@#2NlZ-qsAS(UO-%(NK|h>CmJWS`CZL|F~nL{ zscCjr(YI_>k2jZF6YF^r8+eWfy^dk8qnwVAW?!$nM1D(bSy4elB})`~9Zg=xRywNa zXz@Dwy^b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llP#sy&iQj^{a zqtPF!!PUEg^Za!l3e)I=>Uv5Ka2i6F4m)I={W(M(gi#9CnMs0ltm{*V@$(j{7fwNVpQ zszj=@7VR`8I|hu@+{n{tC(Y^dj|1BU>O^*Z)XJ$?Eu^9Ctz?o0|#Kg$N9cEyjnagrSX}_5^ zd1=GSwqWgge|~9M{#B{0kmcK+NL&n7@DllQzgb;y;Iw(p;K|~TQFF2XxGI~V#*be+7hL7kD4kOwj*OXw@%t-Z+r9JJ Z&-j6}=6Qpkkbj>uEzTFpjz7&U{D0a6b20z` From 149b8fe2c65b6254bb92629d1bf90bea88d23a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20B=C3=A9lorgey?= Date: Sat, 5 Mar 2016 11:03:00 +0100 Subject: [PATCH 5/9] [CLA] signature for lbelorgey Closes #11226 --- doc/cla/individual/lbelorgey.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/cla/individual/lbelorgey.md diff --git a/doc/cla/individual/lbelorgey.md b/doc/cla/individual/lbelorgey.md new file mode 100644 index 00000000000..6cdacb5cdf1 --- /dev/null +++ b/doc/cla/individual/lbelorgey.md @@ -0,0 +1,11 @@ +France, 2015-10-30 + +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, + +Laurent Bélorgey lb@lalieutenante.com https://github.com/lbelorgey \ No newline at end of file From f94f570be683c10be3d20c937f4e3c50e6612396 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Tue, 17 May 2016 09:09:59 +0200 Subject: [PATCH 6/9] [FIX] doc: declaration of computed fields Cannot link a method before declaring it. Closes #12057 --- doc/reference/orm.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst index fa986038bb6..8b7b9c1a4ad 100644 --- a/doc/reference/orm.rst +++ b/doc/reference/orm.rst @@ -309,9 +309,9 @@ Default values are defined as parameters on fields, either a value:: or a function called to compute the default value, which should return that value:: - a_field = fields.Char(default=compute_default_value) def compute_default_value(self): return self.get_value() + a_field = fields.Char(default=compute_default_value) Computed fields --------------- From f558c049d03d822394b6edf844d8ab862cdb1115 Mon Sep 17 00:00:00 2001 From: Xudong Yang Date: Tue, 31 May 2016 11:37:14 +0800 Subject: [PATCH 7/9] [FIX] base_import: t-if does not work with t-jquery Not evaluated, move the condition to the button Closes #12230 --- addons/base_import/static/src/xml/import.xml | 4 ++-- doc/cla/individual/Wizr.md | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 doc/cla/individual/Wizr.md diff --git a/addons/base_import/static/src/xml/import.xml b/addons/base_import/static/src/xml/import.xml index f173263e187..b67aba5c027 100644 --- a/addons/base_import/static/src/xml/import.xml +++ b/addons/base_import/static/src/xml/import.xml @@ -413,8 +413,8 @@ - - diff --git a/doc/cla/individual/Wizr.md b/doc/cla/individual/Wizr.md new file mode 100644 index 00000000000..b99881db1a7 --- /dev/null +++ b/doc/cla/individual/Wizr.md @@ -0,0 +1,11 @@ +China, 2016-04-29 + +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, + +Xudong Yang fanderous@gmail.com https://github.com/Wizr From af1a8758ec303dd5b0c30b44d06eac29bfc82ec9 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 2 Jun 2016 21:14:50 +0200 Subject: [PATCH 8/9] [FIX] res.partner: performance of name_get() Rev. 93e9a4dce7550af5cecab398670a4a53ea41f130 tried to speed up the 9.0 name_get() of res.partner by only calling fields_get() once for the whole name_get, instead of calling it lazily. This may have worked for name_get calls on multiple unnamed addresses (name is NULL), but this is a rare occurrence in practice - while now every single name_get() call would incur the full cost of the fields_get() call. That fields_get() call is O(n) in the number of fields, and there can be quite a few for res.partner. Calling it only for the specific 'type' field can easily be about 40x faster than without it. And since name_get() is called for each Many2One field of each record being read (due to convert_to_read()), reading a batch of records with partner fields had become quite a bit slower! Avoiding this cost entirely with lazy fields_get() calls saves quite a lot of time for the common cases. And now that fields_get() specifies a single field, it is cheap enough to be called within the loop. Non-scientific benchmark: account.invoice.search_read() in the list view of invoices took 500ms for 25 invoices _before_ this fix, and 90ms after! --- openerp/addons/base/res/res_partner.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index 0e21b3272dc..f832a90eb2a 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -563,12 +563,11 @@ class res_partner(osv.Model, format_address): if isinstance(ids, (int, long)): ids = [ids] res = [] - types_dict = dict(self.fields_get(cr, uid, context=context)['type']['selection']) for record in self.browse(cr, uid, ids, context=context): name = record.name or '' if record.parent_id and not record.is_company: if not name and record.type in ['invoice', 'delivery', 'other']: - name = types_dict[record.type] + name = dict(self.fields_get(cr, uid, ['type'], context=context)['type']['selection'])[record.type] name = "%s, %s" % (record.parent_name, name) if context.get('show_address_only'): name = self._display_address(cr, uid, record, without_company=True, context=context) From 5ed14ce9b0fb0babc1ed53c451aef6c9327b056e Mon Sep 17 00:00:00 2001 From: Ravi Patel Date: Thu, 17 Mar 2016 11:04:08 +0530 Subject: [PATCH 9/9] [IMP] account: The new draft invoice has the sale order as the source document. Context: Source document on invoice created through a credit note with the modify option Current issue: create an invoice from a sale order, validate it, Create a refund with the modify option The first invoice is reconciled with the refund The new draft invoice doesn't have a source document and can't be reached from the SO Expect result: The new draft invoice should have the sale order as the source document --- addons/account/wizard/account_invoice_refund.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/wizard/account_invoice_refund.py b/addons/account/wizard/account_invoice_refund.py index 638b0e1fc1e..adfa6538c95 100644 --- a/addons/account/wizard/account_invoice_refund.py +++ b/addons/account/wizard/account_invoice_refund.py @@ -98,7 +98,8 @@ class AccountInvoiceRefund(models.TransientModel): 'invoice_line_ids': invoice_lines, 'tax_line_ids': tax_lines, 'date': date, - 'name': description + 'name': description, + 'origin': inv.origin }) for field in ('partner_id', 'account_id', 'currency_id', 'payment_term_id', 'journal_id'):