Skip to content

Commit

Permalink
[MERGE] forward port branch saas-6 up to 8958bfe
Browse files Browse the repository at this point in the history
  • Loading branch information
KangOl committed Jun 6, 2017
2 parents b43151c + 8958bfe commit fffcfcc
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 26 deletions.
6 changes: 3 additions & 3 deletions addons/base_geolocalize/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.

import json
import urllib
import urllib2

from openerp.osv import osv, fields
from openerp import tools
Expand All @@ -12,10 +12,10 @@

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, e:
raise UserError(_('Cannot contact geolocation servers. Please make sure that your internet connection is up and running (%s).') % e)
if result['status'] != 'OK':
Expand Down
2 changes: 1 addition & 1 deletion addons/crm/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _opportunity_meeting_count(self, cr, uid, ids, field_name, arg, context=None
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
'Opportunities', domain=[('type', '=', 'opportunity')]),
'meeting_ids': fields.many2many('calendar.event', 'calendar_event_res_partner_rel','res_partner_id', 'calendar_event_id',
'Meetings'),
'Meetings', copy=False),
'opportunity_count': fields.function(_opportunity_meeting_count, string="Opportunity", type='integer', multi='opp_meet'),
'meeting_count': fields.function(_opportunity_meeting_count, string="# Meetings", type='integer', multi='opp_meet'),
}
Expand Down
17 changes: 13 additions & 4 deletions addons/hw_posbox_homepage/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@
<p>
If you need to grant remote debugging access to a developer, you can do it <a href='/remote_connect'>here</a>.
</p>
<p>
If you need to display the current customer basket on another device, you can do it <a href='/point_of_sale/display'>here</a>.
</p>
%s
<p>
The PosBox software installed on this posbox is <b>version 16</b>,
the posbox version number is independent from Odoo. You can upgrade
Expand All @@ -74,10 +72,21 @@


class PosboxHomepage(openerp.addons.web.controllers.main.Home):

def get_hw_screen_message(self):
return """
<p>
The activate the customer display feature, you will need to reinstall the PosBox software.
You can find the latest images on the <a href="http://nightly.odoo.com/master/posbox/">Odoo Nightly builds</a> website.
Make sure to download at least the version 16.<br/>
Odoo version 11, or above, is required to use the customer display feature.
</p>
"""

@http.route('/', type='http', auth='none', website=True)
def index(self):
#return request.render('hw_posbox_homepage.index',mimetype='text/html')
return index_template
return index_template % self.get_hw_screen_message()

@http.route('/wifi', type='http', auth='none', website=True)
def wifi(self):
Expand Down
5 changes: 4 additions & 1 deletion addons/hw_scanner/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ def set_status(self, status, message = None):
def get_devices(self):
try:
if not evdev:
return None
return []

if not os.path.isdir(self.input_dir):
return []

new_devices = [device for device in listdir(self.input_dir)
if join(self.input_dir, device) not in [dev.evdev.fn for dev in self.open_devices]]
Expand Down
9 changes: 9 additions & 0 deletions addons/hw_screen/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from openerp import http
from openerp.tools import config
from openerp.addons.web.controllers import main as web
from openerp.addons.hw_posbox_homepage.controllers import main as homepage

import logging
import netifaces as ni
Expand All @@ -16,6 +17,14 @@

_logger = logging.getLogger(__name__)

class Homepage(homepage.PosboxHomepage):

def get_hw_screen_message(self):
return """
<p>
If you need to display the current customer basket on another device, you can do it <a href='/point_of_sale/display'>here</a>.
</p>
"""

class HardwareScreen(web.Home):

Expand Down
9 changes: 7 additions & 2 deletions addons/mrp/mrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,13 @@ def _make_consume_line_from_data(self, cr, uid, production, product, uom_id, qty
source_location_id = production.location_src_id.id
prod_location_id = source_location_id
prev_move= False
if production.bom_id.routing_id and production.bom_id.routing_id.location_id and production.bom_id.routing_id.location_id.id != source_location_id:
source_location_id = production.bom_id.routing_id.location_id.id
if production.routing_id:
routing = production.routing_id
else:
routing = production.bom_id.routing_id

if routing and routing.location_id and routing.location_id.id != source_location_id:
source_location_id = routing.location_id.id
prev_move = True

destination_location_id = production.product_id.property_stock_production.id
Expand Down
29 changes: 16 additions & 13 deletions doc/cla/corporate/savoirfairelinux.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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é [email protected] https://github.com/Ehtaga
Bruno Joliveau [email protected] https://github.com/bjoliveau
David Cormier [email protected] https://github.com/cormier
David Dufresne [email protected] https://github.com/dufresnedavid
Davin Baragiotta [email protected] https://github.com/giotta
El Hadji Dem [email protected] https://github.com/ehdem
Guillaume Auger [email protected] https://github.com/jehog
Jérome Boisvert-Chouinard [email protected] https://github.com/jbchouinard
Joao Alfredo Gama Batista [email protected] https://github.com/joaoalf
Jordi Riera [email protected] https://github.com/foutoucour
Julien Roux [email protected] https://github.com/jrouxsfl
Loïc Faure-Lacroix [email protected] https://github.com/llacroix
Maxime Chambreuil [email protected] https://github.com/max3903
Pierre Gault [email protected] https://github.com/gaultp
Julie Moussu [email protected] https://github.com/JulieSFL
Pierre Lamarche [email protected] https://github.com/plamarche
Sandy Carter [email protected] https://github.com/bwrsandman
Vincent Vinet [email protected] https://github.com/veloutin
David Cormier [email protected] https://github.com/cormier (up to 2017-05-12)
Davin Baragiotta [email protected] https://github.com/giotta (up to 2017-05-12)
El Hadji Dem [email protected] https://github.com/ehdem (up to 2017-05-12)
Guillaume Auger [email protected] https://github.com/jehog (up to 2017-05-12)
Jordi Riera [email protected] https://github.com/foutoucour (up to 2017-05-12)
Julien Roux [email protected] https://github.com/jrouxsfl (up to 2017-05-12)
Loïc Faure-Lacroix [email protected] https://github.com/llacroix (up to 2017-05-12)
Maxime Chambreuil [email protected] https://github.com/max3903 (up to 2017-05-12)
Pierre Gault [email protected] https://github.com/gaultp (up to 2017-05-12)
Sandy Carter [email protected] https://github.com/bwrsandman (up to 2017-05-12)
Vincent Vinet [email protected] https://github.com/veloutin (up to 2017-05-12)
2 changes: 1 addition & 1 deletion doc/cla/individual/JesusVMayor.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ declaration.
Signed,

Jesús Ventosinos Mayor [email protected] https://github.com/jesusVMayor

Jesús Ventosinos Mayor [email protected] https://github.com/jesusVMayor
2 changes: 1 addition & 1 deletion openerp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ def is_constraint(func):
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.column and field.column._fnct_inv):
elif not (field.store or field.column and field.column._fnct_inv or field.inherited):
_logger.warning("method %s.%s: @constrains parameter %r is not writeable", cls._name, attr, name)
methods.append(func)

Expand Down

0 comments on commit fffcfcc

Please sign in to comment.