[MERGE] forward port branch 10.0 up to ea42f6c176

This commit is contained in:
Christophe Simonis
2018-04-06 10:35:25 +02:00
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -1418,6 +1418,7 @@ class AccountInvoiceTax(models.Model):
base = fields.Monetary(string='Base', compute='_compute_base_amount', store=True)
# DO NOT FORWARD-PORT!!! ONLY FOR v10
@api.model
def create(self, vals):
inv_tax = super(AccountInvoiceTax, self).create(vals)
# Workaround to make sure the tax amount is rounded to the currency precision since the ORM
+2 -1
View File
@@ -220,7 +220,8 @@ class rml_parse(object):
date = datetime(*value.timetuple()[:6])
if date_time:
# Convert datetime values to the expected client/context timezone
record = self.env['base'].with_context(self.localcontext)
env = odoo.api.Environment(self.cr, self.uid, {})
record = env['base'].with_context(self.localcontext)
date = fields.Datetime.context_timestamp(record, date)
return date.strftime(date_format.encode('utf-8'))