summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/account/models/account.py1
-rw-r--r--addons/account/models/account_move.py2
-rw-r--r--addons/account/static/src/js/reconciliation/reconciliation_model.js2
-rw-r--r--addons/base_address_extended/models/base_address_extended.py5
-rw-r--r--addons/mail/models/ir_actions.py6
-rw-r--r--addons/stock/models/stock_picking.py5
6 files changed, 18 insertions, 3 deletions
diff --git a/addons/account/models/account.py b/addons/account/models/account.py
index 2763c3ededd..eea65d9c3dc 100644
--- a/addons/account/models/account.py
+++ b/addons/account/models/account.py
@@ -1025,6 +1025,7 @@ class AccountTax(models.Model):
'refund_account_id': tax.refund_account_id.id,
'analytic': tax.analytic,
'price_include': tax.price_include,
+ 'tax_exigibility': tax.tax_exigibility,
})
return {
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 2be508c3afb..9f9111a7300 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -954,6 +954,8 @@ class AccountMoveLine(models.Model):
ctx['date'] = vals['date']
temp['currency_id'] = bank.currency_id.id
temp['amount_currency'] = bank.company_id.currency_id.with_context(ctx).compute(tax_vals['amount'], bank.currency_id, round=True)
+ if vals.get('tax_exigible'):
+ temp['tax_exigible'] = True
tax_lines_vals.append(temp)
#Toggle the 'tax_exigible' field to False in case it is not yet given and the tax in 'tax_line_id' or one of
diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js
index 0ad7b9b8765..5d0dc13105a 100644
--- a/addons/account/static/src/js/reconciliation/reconciliation_model.js
+++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js
@@ -838,6 +838,7 @@ var StatementModel = BasicModel.extend({
prop.computed_with_tax = tax.price_include
prop.tax_amount = tax.amount
+ prop.tax_exigible = tax.tax_exigibility === 'on_payment' ? true : undefined
prop.amount = tax.base;
prop.amount_str = field_utils.format.monetary(Math.abs(prop.amount), {}, formatOptions);
prop.invalid = !self._isValid(prop);
@@ -1132,6 +1133,7 @@ var StatementModel = BasicModel.extend({
name : prop.label,
debit : amount > 0 ? amount : 0,
credit : amount < 0 ? -amount : 0,
+ tax_exigible: prop.tax_exigible,
// This one isn't usefull for the server,
// But since we need to change the amount (and thus its semantics) into base_amount
// It might be useful to have a trace in the RPC for debugging purposes
diff --git a/addons/base_address_extended/models/base_address_extended.py b/addons/base_address_extended/models/base_address_extended.py
index 5d3ee07e342..766fac55a8b 100644
--- a/addons/base_address_extended/models/base_address_extended.py
+++ b/addons/base_address_extended/models/base_address_extended.py
@@ -33,6 +33,11 @@ class Partner(models.Model):
street_number2 = fields.Char('Door', compute='_split_street', help="Door Number",
inverse='_set_street', store=True)
+ @api.model
+ def _address_fields(self):
+ """Returns the list of address fields that are synced from the parent."""
+ return super(Partner, self)._address_fields() + ['street_name', 'street_number', 'street_number2']
+
def get_street_fields(self):
"""Returns the fields that can be used in a street format.
Overwrite this function if you want to add your own fields."""
diff --git a/addons/mail/models/ir_actions.py b/addons/mail/models/ir_actions.py
index bd4b03f3a4c..0f5cbb8708e 100644
--- a/addons/mail/models/ir_actions.py
+++ b/addons/mail/models/ir_actions.py
@@ -48,7 +48,11 @@ class ServerActions(models.Model):
# TDE CLEANME: when going to new api with server action, remove action
if not action.template_id or not self._context.get('active_id'):
return False
- action.template_id.send_mail(self._context.get('active_id'), force_send=False, raise_exception=False)
+ # Clean context from default_type to avoid making attachment
+ # with wrong values in subsequent operations
+ cleaned_ctx = dict(self.env.context)
+ cleaned_ctx.pop('default_type', None)
+ action.template_id.with_context(cleaned_ctx).send_mail(self._context.get('active_id'), force_send=False, raise_exception=False)
return False
@api.model
diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py
index 9c5bc7b6d89..48395898b48 100644
--- a/addons/stock/models/stock_picking.py
+++ b/addons/stock/models/stock_picking.py
@@ -472,8 +472,9 @@ class Picking(models.Model):
else:
location_dest_id, supplierloc = self.env['stock.warehouse']._get_partner_locations()
- self.location_id = location_id
- self.location_dest_id = location_dest_id
+ if self.state == 'draft':
+ self.location_id = location_id
+ self.location_dest_id = location_dest_id
# TDE CLEANME move into onchange_partner_id
if self.partner_id and self.partner_id.picking_warn:
if self.partner_id.picking_warn == 'no-message' and self.partner_id.parent_id: