[MERGE] forward port of branch 8.0 up to 44059bc

This commit is contained in:
Christophe Simonis
2015-04-20 12:33:31 +02:00
12 changed files with 73 additions and 7 deletions
+1
View File
@@ -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,
@@ -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:
+4 -1
View File
@@ -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) {
+3 -1
View File
@@ -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']:
+2 -2
View File
@@ -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)
+15
View File
@@ -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
+17
View File
@@ -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
+11
View File
@@ -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
+11
View File
@@ -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
+2 -3
View File
@@ -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):
+2
View File
@@ -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:
+4
View File
@@ -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