From a8f4b3fa194f5506cc57fec22c4b51d947a7985a Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 17 Feb 2016 16:48:42 +0100 Subject: [PATCH 01/30] [FIX] mrp: wrong field The field name on "mrp.bom" model didn't exist. opw:669698 --- addons/mrp/mrp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 2ac1033f67e..d2fcfbdfc6c 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -313,7 +313,7 @@ class mrp_bom(osv.osv): continue if previous_products and bom_line_id.product_id.product_tmpl_id.id in previous_products: - raise UserError(_('BoM "%s" contains a BoM line with a product recursion: "%s".') % (master_bom.name,bom_line_id.product_id.name_get()[0][1])) + raise UserError(_('BoM "%s" contains a BoM line with a product recursion: "%s".') % (master_bom.code or "", bom_line_id.product_id.name_get()[0][1])) quantity = _factor(bom_line_id.product_qty * factor, bom_line_id.product_efficiency, bom_line_id.product_rounding) bom_id = self._bom_find(cr, uid, product_id=bom_line_id.product_id.id, properties=properties, context=context) From d73e9efc2ea2e455424013e3a07aa38836bb36bd Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 18 Feb 2016 11:33:04 +0100 Subject: [PATCH 02/30] [FIX] uninstall: models no longer in the pool When attempting to uninstall a module for which models are no longer in the pool (the module is no longer is the addons path / no longer in the current release), - This isn't possible to drop the constraints, as this is no longer possible to know the table of the model. - This is no longer possible to check if the model log the accesses (`_log_access`), as the model is no longer loaded in the pool. opw-669130 --- openerp/addons/base/ir/ir_model.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openerp/addons/base/ir/ir_model.py b/openerp/addons/base/ir/ir_model.py index 667b9cef3cc..9e50a9fbcb8 100644 --- a/openerp/addons/base/ir/ir_model.py +++ b/openerp/addons/base/ir/ir_model.py @@ -597,7 +597,9 @@ class ir_model_constraint(Model): ids.reverse() for data in self.browse(cr, uid, ids, context): model = data.model.model - model_obj = self.pool[model] + model_obj = self.pool.get(model) + if not model_obj: + continue name = openerp.tools.ustr(data.name) typ = data.type @@ -1214,7 +1216,7 @@ class ir_model_data(osv.osv): _logger.info('Deleting orphan external_ids %s', external_ids) self.unlink(cr, uid, external_ids) continue - if field.name in openerp.models.LOG_ACCESS_COLUMNS and self.pool[field.model]._log_access: + if field.name in openerp.models.LOG_ACCESS_COLUMNS and field.model in self.pool and self.pool[field.model]._log_access: continue if field.name == 'id': continue From e673ee6c627625e76205570a16e1391083b87849 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 18 Feb 2016 12:19:46 +0100 Subject: [PATCH 03/30] [FIX] website_sale: checkout change of delivery address If a customer had several delivery address, and at checkout, choose another one than the default one, his choice was applied, the delivery address remained the default one. This is a regression in Odoo 9.0 introduced in revision: 0414c9d. The checkout shipping was applied only when it was a new delivey address, due to the identation. Part of the indentation issue was solved in 0f25a8c opw-669787 --- addons/website_sale/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 7001a4d30d0..731b9ffe18b 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -633,7 +633,7 @@ class website_sale(http.Controller): shipping_info['lang'] = partner_lang shipping_info['parent_id'] = partner_id checkout['shipping_id'] = orm_partner.create(cr, SUPERUSER_ID, shipping_info, context) - order.write({'partner_shipping_id': checkout.get('shipping_id')}) + order.write({'partner_shipping_id': checkout.get('shipping_id')}) order_obj.onchange_partner_shipping_id(cr, SUPERUSER_ID, [order.id], context=context) order.order_line._compute_tax_id() From 1ed7d16cfa70e36841a2ccb38bba25d9f22e512d Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 18 Feb 2016 12:22:25 +0100 Subject: [PATCH 04/30] [FIX] point_of_sale: hide debug manager and chatter When printing a receipt in the PoS, the debug manager and the Livechat content are displayed in the receipt. That's obviously something we don't want. opw-668675 --- addons/point_of_sale/static/src/css/pos.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index cdc92f94def..42372a7fb6f 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -1507,6 +1507,12 @@ td { font-size: 13px !important; width: 266px !important; } + .o_debug_manager { + display: none !important; + } + .o_chat_window { + display: none !important; + } } /* d) The Scale screen */ From a04fce47e99723cb82f023b783ae2dfab0e817f3 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 18 Feb 2016 13:41:09 +0100 Subject: [PATCH 05/30] [FIX] account: methods calling `reverse_moves` expects a list The methods calling `reverse_moves` expects a list as returned result. For instance, in `account_move.py`, `account.partial.reconcile`, method unlink: ``` reversed_moves = exchange_rate_entries.reverse_moves() for rev_move in self.env['account.move'].browse(reversed_moves): ``` If there was no reversed moves, the method returned a boolean, and a list otherwise. It should always return a list, empty in the above first case. opw-669790 --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index c6f8dd3165f..af0bfab855a 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -211,7 +211,7 @@ class AccountMove(models.Model): reversed_moves._post_validate() reversed_moves.post() return [x.id for x in reversed_moves] - return True + return [] @api.multi def open_reconcile_view(self): From 22830251c707839510b048ab15ac2f3494740b61 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 18 Feb 2016 14:41:30 +0100 Subject: [PATCH 06/30] [FIX] website_sale: avoid to set no shipping address This is related to the revision e673ee6c627625e76205570a16e1391083b87849. The checkout shipping address must be written on the sale order only if there is one. --- addons/website_sale/controllers/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 731b9ffe18b..e71f56b7fa0 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -633,7 +633,8 @@ class website_sale(http.Controller): shipping_info['lang'] = partner_lang shipping_info['parent_id'] = partner_id checkout['shipping_id'] = orm_partner.create(cr, SUPERUSER_ID, shipping_info, context) - order.write({'partner_shipping_id': checkout.get('shipping_id')}) + if checkout.get('shipping_id'): + order.write({'partner_shipping_id': checkout['shipping_id']}) order_obj.onchange_partner_shipping_id(cr, SUPERUSER_ID, [order.id], context=context) order.order_line._compute_tax_id() From 6a66f9f011bff41e1eb43db31ec59ad7428bfcbb Mon Sep 17 00:00:00 2001 From: rmu-odoo Date: Wed, 27 Jan 2016 17:15:25 +0530 Subject: [PATCH 07/30] [IMP] l10n_ar: create tag and update old tag for one tag per grid in the tax reports --- addons/l10n_ar/account_tax.xml | 128 +++++++++++++++++++++++++++------ 1 file changed, 107 insertions(+), 21 deletions(-) diff --git a/addons/l10n_ar/account_tax.xml b/addons/l10n_ar/account_tax.xml index 4975a3c3ffe..1f337137925 100644 --- a/addons/l10n_ar/account_tax.xml +++ b/addons/l10n_ar/account_tax.xml @@ -3,32 +3,118 @@ - - ITAX_21-OUT + + Base Imponible taxes - - OTAX_21-IN + + + Base Imponible - Ventas taxes - - ITAX_27-OUT + + + Ventas Gravadas con IVA taxes - - OTAX_27-IN + + + Ventas NO Gravadas (Exoneradas) taxes - - ITAX_105-OUT + + + Ventas Gravadas Fuera de Ámbito taxes - - OTAX_105-IN + + + Base Imponible - Compras taxes - - OTAX_02-IN + + + Compras Gravadas con IVA + taxes + + + + Compras NO Gravadas (Exoneradas) + taxes + + + + Compras Gravadas Fuera de Ámbito + taxes + + + + Impuesto General a las Ventas (IVA) Total a Pagar + taxes + + + + Impuesto Pagado + taxes + + + + Impuesto Pagado IVA + taxes + + + + Impuesto Pagado de Exonerados al IVA + taxes + + + + Impuesto Pagado Fuera de Ámbito + taxes + + + + Impuesto Cobrado + taxes + + + + Impuesto Cobrado IVA + taxes + + + + Impuesto Cobrado de Exonerados al IVA + taxes + + + + Impuesto Cobrado Fuera de Ámbito + taxes + + + + Impuesto Nacionales a Pagar + taxes + + + + Impuesto a las Ganancias a Pagar + taxes + + + + Impuesto a los Bienes Personales a Pagar + taxes + + + + Impuesto a la Ganancia Mínima Presunta a Pagar + taxes + + + + Monotributo a Pagar taxes @@ -42,7 +128,7 @@ sale - + @@ -54,7 +140,7 @@ purchase - + @@ -66,7 +152,7 @@ sale - + @@ -78,7 +164,7 @@ purchase - + @@ -90,7 +176,7 @@ sale - + @@ -102,7 +188,7 @@ purchase - + @@ -114,7 +200,7 @@ purchase - + From 50b20e2c7e0a0374cf8e3dec2c3a88b74f18a894 Mon Sep 17 00:00:00 2001 From: rmu-odoo Date: Wed, 27 Jan 2016 17:28:45 +0530 Subject: [PATCH 08/30] [IMP] l10n_ar: Added new migration file for tag --- addons/l10n_ar/__openerp__.py | 2 +- addons/l10n_ar/migrations/2.0/post-migrate_tags_on_taxes.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 addons/l10n_ar/migrations/2.0/post-migrate_tags_on_taxes.py diff --git a/addons/l10n_ar/__openerp__.py b/addons/l10n_ar/__openerp__.py index 1bfab877bfb..66d2d43ce1f 100644 --- a/addons/l10n_ar/__openerp__.py +++ b/addons/l10n_ar/__openerp__.py @@ -5,7 +5,7 @@ { 'name': 'Argentina - Accounting', - 'version': '1.0', + 'version': '2.0', 'description': """ Argentinian accounting chart and tax localization. ================================================== diff --git a/addons/l10n_ar/migrations/2.0/post-migrate_tags_on_taxes.py b/addons/l10n_ar/migrations/2.0/post-migrate_tags_on_taxes.py new file mode 100644 index 00000000000..fa56fd00dfa --- /dev/null +++ b/addons/l10n_ar/migrations/2.0/post-migrate_tags_on_taxes.py @@ -0,0 +1,6 @@ +from openerp.modules.registry import RegistryManager + +def migrate(cr, version): + registry = RegistryManager.get(cr.dbname) + from openerp.addons.account.models.chart_template import migrate_tags_on_taxes + migrate_tags_on_taxes(cr, registry) From a6a46b4371383b0434de93ea8796b3c4930b236a Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 18 Feb 2016 15:53:23 +0100 Subject: [PATCH 09/30] [FIX] mail: ensure we have at least one partner before reading its name --- addons/mail/static/src/js/chat_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js index d1c17e1b965..14551a258c0 100644 --- a/addons/mail/static/src/js/chat_manager.js +++ b/addons/mail/static/src/js/chat_manager.js @@ -338,7 +338,7 @@ function make_channel (data, options) { } else if (data.public === "private") { channel.type = "private"; } - if ('direct_partner' in data) { + if (_.size(data.direct_partner) > 0) { channel.type = "dm"; channel.name = data.direct_partner[0].name; channel.direct_partner_id = data.direct_partner[0].id; From 6d1b2e1a7ea597b99ac9c5f065cb5a1429f6c71f Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Thu, 18 Feb 2016 13:04:35 +0100 Subject: [PATCH 10/30] [FIX] point_of_sale: load fiscal positions of orders from localStorage The fiscal position on an order was correctly saved to localStorage but they where never loaded from localStorage. --- addons/point_of_sale/static/src/js/models.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 22c3b662867..e3a217c93cc 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -1537,6 +1537,19 @@ exports.Order = Backbone.Model.extend({ this.session_id = json.pos_session_id; this.uid = json.uid; this.name = _t("Order ") + this.uid; + + if (json.fiscal_position_id) { + var fiscal_position = _.find(this.pos.fiscal_positions, function (fp) { + return fp.id === json.fiscal_position_id; + }); + + if (fiscal_position) { + this.fiscal_position = fiscal_position; + } else { + console.error('ERROR: trying to load a fiscal position not available in the pos'); + } + } + if (json.partner_id) { client = this.pos.db.get_partner_by_id(json.partner_id); if (!client) { From ed507e01f110aa1bb4b63a434340ec59adb93e1a Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 18 Feb 2016 16:58:30 +0100 Subject: [PATCH 11/30] [FIX] website_sale: Display comments & suggested product toghether. By shadowing the `product` variable, the suggested products option had the side effect of showing the comments of the last suggested product instead of the current product ones. --- addons/website_sale/views/templates.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 6784fb9eeca..3dc01f720e8 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -541,13 +541,13 @@

Suggested alternatives:

- +
-
+ From e701e566f860b3aa39087a156ff70d140d5688bb Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 18 Feb 2016 09:45:45 +0100 Subject: [PATCH 12/30] [ADD] Github template files for issues and PR --- .github/ISSUE_TEMPLATE.md | 10 ++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 9 +++++++++ CONTRIBUTING.md | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000000..a281cf63870 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,10 @@ +Impacted versions: + +Steps to reproduce: + +Current behavior: + +Expected behavior: + +Video/Screenshot link (optional): + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..f6ed43bd61b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,9 @@ +Description of the issue/feature this PR addresses: + +Current behavior before PR: + +Desired behavior after PR is merged: + + +-- +I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 91e960c97be..002a48bda3f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ TL;DR * If you [make a pull request](https://github.com/odoo/odoo/wiki/Contributing#making-pull-requests), do not create an issue! Use the PR description for that * Issues are handled with a much lower priority than pull requests -* Use this [template](https://github.com/odoo/odoo/wiki/Contributing#reporting-issues) +* Use this [template](https://github.com/odoo/odoo/tree/9.0/.github/ISSUE_TEMPLATE.md) when reporting issues. Please search for duplicates first! * Pull requests must be made against the [correct version](https://github.com/odoo/odoo/wiki/Contributing#against-which-version-should-i-submit-a-patch) * There are restrictions on the kind of [changes allowed in stable series](https://github.com/odoo/odoo/wiki/Contributing#what-does-stable-mean) From 406255ac6b66770f23bb6dad49d5ef4fb392cdfa Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Fri, 19 Feb 2016 08:52:50 +0100 Subject: [PATCH 13/30] [FIX] point_of_sale: export all missing classes from js modules In the interest of being flexible and customizeable all of the defined classes in the POS should be exported so people can easily inherit them and change their behavior. A lot of the time you can get to them even if they're not exported if you get creative enough, but noone should have to resort to such ugly methods. This commit does this for all of the modules except for point_of_sale.popups. It has been omitted because currently it exports a single object (PopupWidget). Modifying this to export an object of objects could potentially break other unofficial modules which we do not want in a stable release. --- addons/point_of_sale/static/src/js/chrome.js | 6 ++++++ addons/point_of_sale/static/src/js/screens.js | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/addons/point_of_sale/static/src/js/chrome.js b/addons/point_of_sale/static/src/js/chrome.js index 0c7d90612ca..ea2febfbf23 100644 --- a/addons/point_of_sale/static/src/js/chrome.js +++ b/addons/point_of_sale/static/src/js/chrome.js @@ -759,7 +759,13 @@ var Chrome = PosBaseWidget.extend({ return { Chrome: Chrome, + DebugWidget: DebugWidget, + HeaderButtonWidget: HeaderButtonWidget, OrderSelectorWidget: OrderSelectorWidget, + ProxyStatusWidget: ProxyStatusWidget, + StatusWidget: StatusWidget, + SynchNotificationWidget: SynchNotificationWidget, + UsernameWidget: UsernameWidget, }; }); diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index beffd60af28..15fba3f1975 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1962,6 +1962,11 @@ return { ProductScreenWidget: ProductScreenWidget, ProductListWidget: ProductListWidget, ClientListScreenWidget: ClientListScreenWidget, + ActionpadWidget: ActionpadWidget, + DomCache: DomCache, + ProductCategoriesWidget: ProductCategoriesWidget, + ScaleScreenWidget: ScaleScreenWidget, + set_fiscal_position_button: set_fiscal_position_button, }; }); From 1928ca95c2ad5ba36e67ee6f7401543f12576d81 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 18 Feb 2016 14:03:12 +0100 Subject: [PATCH 14/30] [FIX] website_event_sale: registration form without possibilities When there is no possibilities(no event_ticket_ids) the registration form doesn't have to be displayed. opw:668603 --- addons/website_event_sale/views/website_event_sale.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/website_event_sale/views/website_event_sale.xml b/addons/website_event_sale/views/website_event_sale.xml index 047e9e5a4d1..f58e426bf94 100644 --- a/addons/website_event_sale/views/website_event_sale.xml +++ b/addons/website_event_sale/views/website_event_sale.xml @@ -80,6 +80,9 @@ + + event.event_ticket_ids +