summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/mail/mail_followers.py1
-rw-r--r--addons/mail/wizard/mail_compose_message.py1
-rw-r--r--addons/point_of_sale/static/src/js/models.js5
-rw-r--r--addons/stock/product.py4
-rw-r--r--addons/stock_account/stock_account.py4
-rw-r--r--doc/cla/corporate/loyal.md15
-rw-r--r--doc/cla/corporate/syleam.md17
-rw-r--r--doc/cla/individual/PCatinean.md11
-rw-r--r--doc/cla/individual/alejandrosantana.md11
-rw-r--r--openerp/fields.py5
-rw-r--r--openerp/osv/fields.py2
-rw-r--r--openerp/service/server.py4
12 files changed, 73 insertions, 7 deletions
diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py
index 9111e8a8f92..4dd48c2abe0 100644
--- a/addons/mail/mail_followers.py
+++ b/addons/mail/mail_followers.py
@@ -214,6 +214,7 @@ class mail_notification(osv.Model):
mail_values = {
'mail_message_id': message.id,
'auto_delete': (context or {}).get('mail_auto_delete', True),
+ 'mail_server_id': (context or {}).get('mail_server_id', False),
'body_html': body_html,
'recipient_ids': [(4, id) for id in chunk],
'references': references,
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 0f62ab37184..2e0823add68 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -248,6 +248,7 @@ class mail_compose_message(osv.TransientModel):
if wizard.template_id:
context['mail_notify_user_signature'] = False # template user_signature is added when generating body_html
context['mail_auto_delete'] = wizard.template_id.auto_delete # mass mailing: use template auto_delete value -> note, for emails mass mailing only
+ context['mail_server_id'] = wizard.template_id.mail_server_id.id
if wizard.attachment_ids and wizard.composition_mode != 'mass_mail' and wizard.template_id:
new_attachment_ids = []
for attachment in wizard.attachment_ids:
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 2ab32e322b6..ad60726b761 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -135,7 +135,7 @@ openerp.point_of_sale.load_models = function load_models(instance, module){ //mo
loaded: function(self,users){ self.user = users[0]; },
},{
model: 'res.company',
- fields: [ 'currency_id', 'email', 'website', 'company_registry', 'vat', 'name', 'phone', 'partner_id' , 'country_id'],
+ fields: [ 'currency_id', 'email', 'website', 'company_registry', 'vat', 'name', 'phone', 'partner_id' , 'country_id', 'tax_calculation_rounding_method'],
ids: function(self){ return [self.user.company_id[0]] },
loaded: function(self,companies){ self.company = companies[0]; },
},{
@@ -1098,6 +1098,9 @@ openerp.point_of_sale.load_models = function load_models(instance, module){ //mo
var self = this;
var res = [];
var currency_rounding = this.pos.currency.rounding;
+ if (this.pos.company.tax_calculation_rounding_method == "round_globally"){
+ currency_rounding = currency_rounding * 0.00001;
+ }
var base = price_unit;
_(taxes).each(function(tax) {
if (tax.price_include) {
diff --git a/addons/stock/product.py b/addons/stock/product.py
index c79dd016dba..21f88a8d63d 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -280,7 +280,9 @@ class product_product(osv.osv):
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
- res = super(product_product,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
+ res = super(product_product, self).fields_view_get(
+ cr, uid, view_id=view_id, view_type=view_type, context=context,
+ toolbar=toolbar, submenu=submenu)
if context is None:
context = {}
if ('location' in context) and context['location']:
diff --git a/addons/stock_account/stock_account.py b/addons/stock_account/stock_account.py
index d1a66610264..cd80a630e67 100644
--- a/addons/stock_account/stock_account.py
+++ b/addons/stock_account/stock_account.py
@@ -201,9 +201,9 @@ class stock_quant(osv.osv):
valuation_amount = context.get('force_valuation_amount')
else:
if move.product_id.cost_method == 'average':
- valuation_amount = move.location_id.usage != 'internal' and move.location_dest_id.usage == 'internal' and cost or move.product_id.standard_price
+ valuation_amount = cost if move.location_id.usage != 'internal' and move.location_dest_id.usage == 'internal' else move.product_id.standard_price
else:
- valuation_amount = move.product_id.cost_method == 'real' and cost or move.product_id.standard_price
+ valuation_amount = cost if move.product_id.cost_method == 'real' else move.product_id.standard_price
#the standard_price of the product may be in another decimal precision, or not compatible with the coinage of
#the company currency... so we need to use round() before creating the accounting entries.
valuation_amount = currency_obj.round(cr, uid, move.company_id.currency_id, valuation_amount * qty)
diff --git a/doc/cla/corporate/loyal.md b/doc/cla/corporate/loyal.md
new file mode 100644
index 00000000000..d3b4fcb5da8
--- /dev/null
+++ b/doc/cla/corporate/loyal.md
@@ -0,0 +1,15 @@
+China, 2015-03-13
+
+Loyal agrees to the terms of the Odoo Corporate Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Kevin Wang kevin_327@163.com https://github.com/kevin3274
+
+List of contributors:
+
+Kevin Wang kevin@loyal-info.com https://github.com/kevin3274
diff --git a/doc/cla/corporate/syleam.md b/doc/cla/corporate/syleam.md
new file mode 100644
index 00000000000..75ac0025efe
--- /dev/null
+++ b/doc/cla/corporate/syleam.md
@@ -0,0 +1,17 @@
+France, 2015-04-08
+
+Syleam agrees to the terms of the Odoo Corporate Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Sylvain Garancher sylvain.garancher@syleam.fr https://github.com/sylvain-garancher
+
+List of contributors:
+
+Sébastien Lange sebastien.lange@syleam.fr https://github.com/alnslang
+Sylvain Garancher sylvain.garancher@syleam.fr https://github.com/sylvain-garancher
+Alexandre Moreau alexandre.moreau@syleam.fr https://github.com/a-moreau
diff --git a/doc/cla/individual/PCatinean.md b/doc/cla/individual/PCatinean.md
new file mode 100644
index 00000000000..4c846d97335
--- /dev/null
+++ b/doc/cla/individual/PCatinean.md
@@ -0,0 +1,11 @@
+Romania, 2015-04-01
+
+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,
+
+Paul Catinean paulcatinean@gmail.com https://github.com/PCatinean
diff --git a/doc/cla/individual/alejandrosantana.md b/doc/cla/individual/alejandrosantana.md
new file mode 100644
index 00000000000..aa3517ddb2b
--- /dev/null
+++ b/doc/cla/individual/alejandrosantana.md
@@ -0,0 +1,11 @@
+Spain, 2015-04-09
+
+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,
+
+Alejandro Santana tech@alejandrosantana.eu https://github.com/alejandrosantana
diff --git a/openerp/fields.py b/openerp/fields.py
index 816eeedcae4..ad8b6e8ec3d 100644
--- a/openerp/fields.py
+++ b/openerp/fields.py
@@ -1242,17 +1242,16 @@ class Datetime(Field):
"""
assert isinstance(timestamp, datetime), 'Datetime instance expected'
tz_name = record._context.get('tz') or record.env.user.tz
+ utc_timestamp = pytz.utc.localize(timestamp, is_dst=False) # UTC = no DST
if tz_name:
try:
- utc = pytz.timezone('UTC')
context_tz = pytz.timezone(tz_name)
- utc_timestamp = utc.localize(timestamp, is_dst=False) # UTC = no DST
return utc_timestamp.astimezone(context_tz)
except Exception:
_logger.debug("failed to compute context/client-specific timestamp, "
"using the UTC value",
exc_info=True)
- return timestamp
+ return utc_timestamp
@staticmethod
def from_string(value):
diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py
index 5717d5326ee..9ad289cde1b 100644
--- a/openerp/osv/fields.py
+++ b/openerp/osv/fields.py
@@ -151,6 +151,8 @@ class _column(object):
def __getattr__(self, name):
""" Access a non-slot attribute. """
+ if name == '_args':
+ raise AttributeError(name)
try:
return self._args[name]
except KeyError:
diff --git a/openerp/service/server.py b/openerp/service/server.py
index a199951d717..524d27e4eab 100644
--- a/openerp/service/server.py
+++ b/openerp/service/server.py
@@ -167,6 +167,10 @@ class CommonServer(object):
try:
sock.shutdown(socket.SHUT_RDWR)
except socket.error, e:
+ if e.errno == errno.EBADF:
+ # Werkzeug > 0.9.6 closes the socket itself (see commit
+ # https://github.com/mitsuhiko/werkzeug/commit/4d8ca089)
+ return
# On OSX, socket shutdowns both sides if any side closes it
# causing an error 57 'Socket is not connected' on shutdown
# of the other side (or something), see