[MERGE] forward port branch 10.0 up to 718a5b76b8
This commit is contained in:
@@ -422,7 +422,7 @@ class AccountMoveLine(models.Model):
|
||||
help="This field is used for payable and receivable journal entries. You can put the limit date for the payment of this line.")
|
||||
date = fields.Date(related='move_id.date', string='Date', index=True, store=True, copy=False) # related is required
|
||||
analytic_line_ids = fields.One2many('account.analytic.line', 'move_id', string='Analytic lines', oldname="analytic_lines")
|
||||
tax_ids = fields.Many2many('account.tax', string='Taxes')
|
||||
tax_ids = fields.Many2many('account.tax', string='Taxes', domain=['|', ('active', '=', False), ('active', '=', True)])
|
||||
tax_line_id = fields.Many2one('account.tax', string='Originator tax', ondelete='restrict')
|
||||
analytic_account_id = fields.Many2one('account.analytic.account', string='Analytic Account')
|
||||
analytic_tag_ids = fields.Many2many('account.analytic.tag', string='Analytic tags')
|
||||
|
||||
@@ -485,7 +485,8 @@ class Lead(models.Model):
|
||||
for field in fields:
|
||||
value = getattr(self, field.name, False)
|
||||
if field.ttype == 'selection':
|
||||
value = dict(field.get_values(self.env)).get(value, value)
|
||||
selections = self.fields_get()[field.name]['selection']
|
||||
value = next((v[1] for v in selections if v[0] == value), value)
|
||||
elif field.ttype == 'many2one':
|
||||
if value:
|
||||
value = value.sudo().name_get()[0][1]
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
<div>
|
||||
<span><strong>Customer Address:</strong></span>
|
||||
</div>
|
||||
<div t-if="o.move_lines and o.move_lines[0].partner_id" name="partner_header">
|
||||
<div t-if="o.move_lines and o.move_lines[0].partner_id and not o.partner_id" name="partner_header">
|
||||
<div t-field="o.move_lines[0].partner_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True}'/>
|
||||
</div>
|
||||
<div t-if="not (o.move_lines and o.move_lines[0].partner_id) and o.partner_id" name="partner_header">
|
||||
<div t-if="o.partner_id" name="partner_header">
|
||||
<div t-field="o.partner_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True}'/>
|
||||
</div>
|
||||
|
||||
@@ -95,8 +95,10 @@ class SaleOrder(models.Model):
|
||||
|
||||
@api.model
|
||||
def _get_errors(self, order):
|
||||
# Do not Forward port in v11.0 as the API was refactored by f9a8c53e485445bc8e3474eb3978b0f83d5645c7
|
||||
has_stockable_products = any(order.order_line.filtered(lambda line: line.product_id.type in ['consu', 'product']))
|
||||
errors = super(SaleOrder, self)._get_errors(order)
|
||||
if not order._get_delivery_methods():
|
||||
if not order._get_delivery_methods() and has_stockable_products:
|
||||
errors.append(
|
||||
(_('Sorry, we are unable to ship your order'),
|
||||
_('No shipping method is available for your current order and shipping address. '
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
México, 9-2-2015
|
||||
México, 2015-02-09
|
||||
|
||||
Vauxoo agrees to the terms of the Odoo Corporate Contributor License Agreement v1.0.
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ def compute_session_token(session, env):
|
||||
|
||||
def check_session(session, env):
|
||||
self = env['res.users'].browse(session.uid)
|
||||
if odoo.tools.misc.consteq(self._compute_session_token(session.sid), session.session_token):
|
||||
expected = self._compute_session_token(session.sid)
|
||||
if expected and odoo.tools.misc.consteq(expected, session.session_token):
|
||||
return True
|
||||
self._invalidate_session_cache()
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user