[MERGE] forward port branch saas-14 up to ce5b4b6512
This commit is contained in:
@@ -263,6 +263,17 @@ class MrpProduction(models.Model):
|
|||||||
self.location_src_id = self.picking_type_id.default_location_src_id.id or location.id
|
self.location_src_id = self.picking_type_id.default_location_src_id.id or location.id
|
||||||
self.location_dest_id = self.picking_type_id.default_location_dest_id.id or location.id
|
self.location_dest_id = self.picking_type_id.default_location_dest_id.id or location.id
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def write (self, vals):
|
||||||
|
res = super(MrpProduction, self).write(vals)
|
||||||
|
if 'date_planned_start' in vals:
|
||||||
|
moves = (self.mapped('move_raw_ids') + self.mapped('move_finished_ids')).filtered(
|
||||||
|
lambda r: r.state not in ['done', 'cancel'])
|
||||||
|
moves.write({
|
||||||
|
'date_expected': vals['date_planned_start'],
|
||||||
|
})
|
||||||
|
return res
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def create(self, values):
|
def create(self, values):
|
||||||
if not values.get('name', False) or values['name'] == _('New'):
|
if not values.get('name', False) or values['name'] == _('New'):
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ class AuthorizeAPI():
|
|||||||
etree.SubElement(billTo, "address").text = (partner.street or '' + (partner.street2 if partner.street2 else '')) or None
|
etree.SubElement(billTo, "address").text = (partner.street or '' + (partner.street2 if partner.street2 else '')) or None
|
||||||
etree.SubElement(billTo, "city").text = partner.city
|
etree.SubElement(billTo, "city").text = partner.city
|
||||||
etree.SubElement(billTo, "state").text = partner.state_id.name or None
|
etree.SubElement(billTo, "state").text = partner.state_id.name or None
|
||||||
etree.SubElement(billTo, "zip").text = partner.zip
|
etree.SubElement(billTo, "zip").text = partner.zip or ''
|
||||||
etree.SubElement(billTo, "country").text = partner.country_id.name or None
|
etree.SubElement(billTo, "country").text = partner.country_id.name or None
|
||||||
payment = etree.SubElement(payment_profile, "payment")
|
payment = etree.SubElement(payment_profile, "payment")
|
||||||
creditCard = etree.SubElement(payment, "creditCard")
|
creditCard = etree.SubElement(payment, "creditCard")
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
<field name="inherit_id" ref="account.view_invoice_line_form"/>
|
<field name="inherit_id" ref="account.view_invoice_line_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="account_id" position="before">
|
<field name="account_id" position="before">
|
||||||
<field name="purchase_id"/>
|
<field name="purchase_id" invisible="context.get('type') in ('out_invoice', 'out_refund')"/>
|
||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -166,7 +166,7 @@
|
|||||||
<t t-set="additional_title">Shop</t>
|
<t t-set="additional_title">Shop</t>
|
||||||
<div id="wrap" class="js_sale">
|
<div id="wrap" class="js_sale">
|
||||||
<div class="oe_structure" />
|
<div class="oe_structure" />
|
||||||
<div t-attf-class="container oe_website_sale #{'oe_website_sale_search' if search else None}">
|
<div class="container oe_website_sale">
|
||||||
<div class="products_pager">
|
<div class="products_pager">
|
||||||
<div class="row" style="width: 100%;">
|
<div class="row" style="width: 100%;">
|
||||||
<t t-call="website_sale.search">
|
<t t-call="website_sale.search">
|
||||||
|
|||||||
@@ -441,6 +441,7 @@ class IrMailServer(models.Model):
|
|||||||
email_to = message['To']
|
email_to = message['To']
|
||||||
email_cc = message['Cc']
|
email_cc = message['Cc']
|
||||||
email_bcc = message['Bcc']
|
email_bcc = message['Bcc']
|
||||||
|
del message['Bcc']
|
||||||
|
|
||||||
smtp_to_list = filter(None, tools.flatten(map(extract_rfc2822_addresses, [email_to, email_cc, email_bcc])))
|
smtp_to_list = filter(None, tools.flatten(map(extract_rfc2822_addresses, [email_to, email_cc, email_bcc])))
|
||||||
assert smtp_to_list, self.NO_VALID_RECIPIENT
|
assert smtp_to_list, self.NO_VALID_RECIPIENT
|
||||||
|
|||||||
@@ -464,13 +464,18 @@ class IrTranslation(models.Model):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# remap existing translations on terms when possible
|
# remap existing translations on terms when possible
|
||||||
|
trans_src = record_trans.mapped('src')
|
||||||
for trans in record_trans:
|
for trans in record_trans:
|
||||||
if trans.src == trans.value:
|
if trans.src == trans.value:
|
||||||
discarded += trans
|
discarded += trans
|
||||||
elif trans.src not in terms:
|
elif trans.src not in terms:
|
||||||
matches = get_close_matches(trans.src, terms, 1, 0.9)
|
matches = get_close_matches(trans.src, terms, 1, 0.9)
|
||||||
if matches:
|
if matches:
|
||||||
trans.write({'src': matches[0], 'state': trans.state})
|
if matches[0] in trans_src:
|
||||||
|
# there is already a translation for this term; discard this one
|
||||||
|
discarded += trans
|
||||||
|
else:
|
||||||
|
trans.write({'src': matches[0], 'state': trans.state})
|
||||||
else:
|
else:
|
||||||
outdated += trans
|
outdated += trans
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user