summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-04-20 12:33:31 +0200
committerChristophe Simonis <chs@odoo.com>2015-04-20 12:33:31 +0200
commit9750c1eae31df8008100debf8bf2bb3ca2ae64e7 (patch)
tree26b043d9def371133d6bac635c261d92b4fe4b85 /addons
parent06fd9e3aa31d0c6493b22b5b910cb101bf922189 (diff)
parent44059bce4bfb11e8282a23c7b03fc4c10bdff821 (diff)
[MERGE] forward port of branch 8.0 up to 44059bc
Diffstat (limited to 'addons')
-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
5 files changed, 11 insertions, 4 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)