diff --git a/addons/base_geolocalize/models/res_partner.py b/addons/base_geolocalize/models/res_partner.py index 2cc4ac92ab8..778a844ad83 100644 --- a/addons/base_geolocalize/models/res_partner.py +++ b/addons/base_geolocalize/models/res_partner.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json -import urllib +import urllib2 from odoo import api, fields, models, tools, _ from odoo.exceptions import UserError @@ -9,10 +9,10 @@ from odoo.exceptions import UserError def geo_find(addr): url = 'https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=' - url += urllib.quote(addr.encode('utf8')) + url += urllib2.quote(addr.encode('utf8')) try: - result = json.load(urllib.urlopen(url)) + result = json.load(urllib2.urlopen(url)) except Exception as e: raise UserError(_('Cannot contact geolocation servers. Please make sure that your Internet connection is up and running (%s).') % e) diff --git a/addons/crm/models/res_partner.py b/addons/crm/models/res_partner.py index a973700c15f..0b20de8b5d5 100644 --- a/addons/crm/models/res_partner.py +++ b/addons/crm/models/res_partner.py @@ -10,7 +10,7 @@ class Partner(models.Model): team_id = fields.Many2one('crm.team', string='Sales Team', oldname='section_id') opportunity_ids = fields.One2many('crm.lead', 'partner_id', string='Opportunities', domain=[('type', '=', 'opportunity')]) - meeting_ids = fields.Many2many('calendar.event', 'calendar_event_res_partner_rel', 'res_partner_id', 'calendar_event_id', string='Meetings') + meeting_ids = fields.Many2many('calendar.event', 'calendar_event_res_partner_rel', 'res_partner_id', 'calendar_event_id', string='Meetings', copy=False) opportunity_count = fields.Integer("Opportunity", compute='_compute_opportunity_count') meeting_count = fields.Integer("# Meetings", compute='_compute_meeting_count') activities_count = fields.Integer("Activities", compute='_compute_activities_count') diff --git a/addons/google_calendar/models/google_calendar.py b/addons/google_calendar/models/google_calendar.py index 2384501f90c..8a751c7a45b 100644 --- a/addons/google_calendar/models/google_calendar.py +++ b/addons/google_calendar/models/google_calendar.py @@ -513,7 +513,7 @@ class GoogleCalendar(models.AbstractModel): if type == "write": res = CalendarEvent.browse(event['id']).write(result) elif type == "copy": - result['recurrence'] = True + result['recurrency'] = True res = CalendarEvent.browse([event['id']]).write(result) elif type == "create": res = CalendarEvent.create(result).id diff --git a/addons/hw_posbox_homepage/controllers/main.py b/addons/hw_posbox_homepage/controllers/main.py index 98d650b041a..5a6cddcc192 100644 --- a/addons/hw_posbox_homepage/controllers/main.py +++ b/addons/hw_posbox_homepage/controllers/main.py @@ -55,9 +55,7 @@ index_template = """
If you need to grant remote debugging access to a developer, you can do it here.
-- If you need to display the current customer basket on another device, you can do it here. -
+ %sThe PosBox software installed on this posbox is version 16, the posbox version number is independent from Odoo. You can upgrade @@ -72,10 +70,21 @@ index_template = """ class PosboxHomepage(odoo.addons.web.controllers.main.Home): + + def get_hw_screen_message(self): + return """ +
+ The activate the customer display feature, you will need to reinstall the PosBox software.
+ You can find the latest images on the Odoo Nightly builds website.
+ Make sure to download at least the version 16.
+ Odoo version 11, or above, is required to use the customer display feature.
+
+If you need to display the current customer basket on another device, you can do it here. +
+""" class HardwareScreen(web.Home): diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index f77e2c155f4..8b0b7c48dea 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -327,8 +327,12 @@ class MrpProduction(models.Model): return self.env['stock.move'] if bom_line.product_id.type not in ['product', 'consu']: return self.env['stock.move'] - if self.bom_id.routing_id and self.bom_id.routing_id.location_id: - source_location = self.bom_id.routing_id.location_id + if self.routing_id: + routing = self.routing_id + else: + routing = self.bom_id.routing_id + if routing and routing.location_id: + source_location = routing.location_id else: source_location = self.location_src_id original_quantity = self.product_qty - self.qty_produced diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index ca81393772d..bf75c52bbd9 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -631,7 +631,7 @@ td { margin-right: 0; text-align: center; vertical-align: top; - width: 188px; + width: 186px; border: none; border-radius: 0; border-top: 1px solid; diff --git a/addons/product/models/product_pricelist.py b/addons/product/models/product_pricelist.py index c4dc828b540..abe09f05fd6 100644 --- a/addons/product/models/product_pricelist.py +++ b/addons/product/models/product_pricelist.py @@ -335,7 +335,7 @@ class ResCountryGroup(models.Model): class PricelistItem(models.Model): _name = "product.pricelist.item" _description = "Pricelist item" - _order = "applied_on, min_quantity desc, categ_id desc" + _order = "applied_on, min_quantity desc, categ_id desc, id" product_tmpl_id = fields.Many2one( 'product.template', 'Product Template', ondelete='cascade', diff --git a/addons/product_margin/models/product_product.py b/addons/product_margin/models/product_product.py index fa65e79b38e..8911e3bc716 100644 --- a/addons/product_margin/models/product_product.py +++ b/addons/product_margin/models/product_product.py @@ -104,7 +104,7 @@ class ProductProduct(models.Model): #Cost price is calculated afterwards as it is a property sqlstr = """ select - sum(l.price_unit * l.quantity)/sum(nullif(l.quantity,0)) as avg_unit_price, + sum(l.price_unit * l.quantity)/nullif(sum(l.quantity),0) as avg_unit_price, sum(l.quantity) as num_qty, sum(l.quantity * (l.price_subtotal/(nullif(l.quantity,0)))) as total, sum(l.quantity * pt.list_price) as sale_expected diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 50a0d7f1154..a9abef4881d 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -259,7 +259,10 @@ class SaleOrder(models.Model): @api.model def create(self, vals): if vals.get('name', _('New')) == _('New'): - vals['name'] = self.env['ir.sequence'].next_by_code('sale.order') or _('New') + if 'company_id' in vals: + vals['name'] = self.env['ir.sequence'].with_context(force_company=vals['company_id']).next_by_code('sale.order') or _('New') + else: + vals['name'] = self.env['ir.sequence'].next_by_code('sale.order') or _('New') # Makes sure partner_invoice_id', 'partner_shipping_id' and 'pricelist_id' are defined if any(f not in vals for f in ['partner_invoice_id', 'partner_shipping_id', 'pricelist_id']): diff --git a/doc/cla/corporate/savoirfairelinux.md b/doc/cla/corporate/savoirfairelinux.md index 31be8b5f9b8..784518b093e 100644 --- a/doc/cla/corporate/savoirfairelinux.md +++ b/doc/cla/corporate/savoirfairelinux.md @@ -1,4 +1,4 @@ -Canada, France, 8-2-2015 +Canada, France, 2017-05-12 Savoir-faire Linux agrees to the terms of the Odoo Corporate Contributor License Agreement v1.0. @@ -8,22 +8,25 @@ declaration. Signed, -Maxime Chambreuil partners@savoirfairelinux.com https://github.com/savoirfairelinux +Jérome Boisvert-Chouinard jerome.boisvertchouinard@savoirfairelinux.com https://github.com/jbchouinard List of contributors: +Agathe Mollé agathe.molle@savoirfairelinux.com https://github.com/Ehtaga Bruno Joliveau bruno.joliveau@savoirfairelinux.com https://github.com/bjoliveau -David Cormier david.cormier@savoirfairelinux.com https://github.com/cormier David Dufresne david.dufresne@savoirfairelinux.com https://github.com/dufresnedavid -Davin Baragiotta davin.baragiotta@savoirfairelinux.com https://github.com/giotta -El Hadji Dem elhadji.dem@savoirfairelinux.com https://github.com/ehdem -Guillaume Auger guillaume.auger@savoirfairelinux.com https://github.com/jehog +Jérome Boisvert-Chouinard jerome.boisvertchouinard@savoirfairelinux.com https://github.com/jbchouinard Joao Alfredo Gama Batista joao.gama@savoirfairelinux.com https://github.com/joaoalf -Jordi Riera jordi.riera@savoirfairelinux.com https://github.com/foutoucour -Julien Roux julien.roux@savoirfairelinux.com https://github.com/jrouxsfl -Loïc Faure-Lacroix loic.lacroix@savoirfairelinux.com https://github.com/llacroix -Maxime Chambreuil maxime.chambreuil@savoirfairelinux.com https://github.com/max3903 -Pierre Gault pierre.gault@savoirfairelinux.com https://github.com/gaultp +Julie Moussu julie.mousse@savoirfairelinux.com https://github.com/JulieSFL Pierre Lamarche pierre.lamarche@savoirfairelinux.com https://github.com/plamarche -Sandy Carter sandy.carter@savoirfairelinux.com https://github.com/bwrsandman -Vincent Vinet vincent.vinet@savoirfairelinux.com https://github.com/veloutin +David Cormier david.cormier@savoirfairelinux.com https://github.com/cormier (up to 2017-05-12) +Davin Baragiotta davin.baragiotta@savoirfairelinux.com https://github.com/giotta (up to 2017-05-12) +El Hadji Dem elhadji.dem@savoirfairelinux.com https://github.com/ehdem (up to 2017-05-12) +Guillaume Auger guillaume.auger@savoirfairelinux.com https://github.com/jehog (up to 2017-05-12) +Jordi Riera jordi.riera@savoirfairelinux.com https://github.com/foutoucour (up to 2017-05-12) +Julien Roux julien.roux@savoirfairelinux.com https://github.com/jrouxsfl (up to 2017-05-12) +Loïc Faure-Lacroix loic.lacroix@savoirfairelinux.com https://github.com/llacroix (up to 2017-05-12) +Maxime Chambreuil maxime.chambreuil@savoirfairelinux.com https://github.com/max3903 (up to 2017-05-12) +Pierre Gault pierre.gault@savoirfairelinux.com https://github.com/gaultp (up to 2017-05-12) +Sandy Carter sandy.carter@savoirfairelinux.com https://github.com/bwrsandman (up to 2017-05-12) +Vincent Vinet vincent.vinet@savoirfairelinux.com https://github.com/veloutin (up to 2017-05-12) diff --git a/doc/cla/individual/JesusVMayor.md b/doc/cla/individual/JesusVMayor.md index c009f323be9..456778e94f5 100644 --- a/doc/cla/individual/JesusVMayor.md +++ b/doc/cla/individual/JesusVMayor.md @@ -9,4 +9,4 @@ declaration. Signed, Jesús Ventosinos Mayor jesus@pexego.es https://github.com/jesusVMayor - +Jesús Ventosinos Mayor jesus@comunitea.com https://github.com/jesusVMayor diff --git a/odoo/models.py b/odoo/models.py index 2529daec444..bd83e31fc8f 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -678,7 +678,7 @@ class BaseModel(object): field = cls._fields.get(name) if not field: _logger.warning("method %s.%s: @constrains parameter %r is not a field name", cls._name, attr, name) - elif not (field.store or field.inverse): + elif not (field.store or field.inverse or field.inherited): _logger.warning("method %s.%s: @constrains parameter %r is not writeable", cls._name, attr, name) methods.append(func)