[MERGE] forward port branch 10.0 up to bf8f701032

This commit is contained in:
Christophe Simonis
2017-09-15 15:47:58 +02:00
6 changed files with 17 additions and 10 deletions
+6
View File
@@ -9591,6 +9591,12 @@ msgstr ""
msgid "You have"
msgstr ""
#. module: account
#: code:addons/account/models/account_payment.py:360
#, python-format
msgid "You have to define a sequence for %s in your company."
msgstr ""
#. module: account
#: code:addons/account/wizard/account_report_general_ledger.py:21
#, python-format
+2
View File
@@ -356,6 +356,8 @@ class account_payment(models.Model):
if rec.payment_type == 'outbound':
sequence_code = 'account.payment.supplier.invoice'
rec.name = self.env['ir.sequence'].with_context(ir_sequence_date=rec.payment_date).next_by_code(sequence_code)
if not rec.name and self.payment_type != 'transfer':
raise UserError(_("You have to define a sequence for %s in your company.") % (sequence_code,))
# Create the journal entry
amount = rec.amount * (rec.payment_type in ('outbound', 'transfer') and 1 or -1)
@@ -111,7 +111,7 @@ class AccountInvoiceReport(models.Model):
ai.type, ai.state, pt.categ_id, ai.date_due, ai.account_id, ail.account_id AS account_line_id,
ai.partner_bank_id,
SUM ((invoice_type.sign * ail.quantity) / u.factor * u2.factor) AS product_qty,
SUM(ail.price_subtotal_signed) AS price_total,
SUM(ail.price_subtotal_signed * invoice_type.sign) AS price_total,
SUM(ABS(ail.price_subtotal_signed)) / CASE
WHEN SUM(ail.quantity / u.factor * u2.factor) <> 0::numeric
THEN SUM(ail.quantity / u.factor * u2.factor)
@@ -20,7 +20,8 @@ class MailMailStats(models.Model):
string='Mail ID (tech)',
help='ID of the related mail_mail. This field is an integer field because '
'the related mail_mail can be deleted separately from its statistics. '
'However the ID is needed for several action and controllers.'
'However the ID is needed for several action and controllers.',
index=True,
)
message_id = fields.Char(string='Message-ID')
model = fields.Char(string='Document model')
+4 -4
View File
@@ -25,10 +25,10 @@ class StockPicking(models.Model):
res = super(StockPicking, self)._create_backorder(backorder_moves)
for picking in self:
if picking.picking_type_id.code == 'incoming':
backorder = self.search([('backorder_id', '=', picking.id)])
backorder.message_post_with_view('mail.message_origin_link',
values={'self': backorder, 'origin': backorder.purchase_id},
subtype_id=self.env.ref('mail.mt_note').id)
for backorder in self.search([('backorder_id', '=', picking.id)]):
backorder.message_post_with_view('mail.message_origin_link',
values={'self': backorder, 'origin': backorder.purchase_id},
subtype_id=self.env.ref('mail.mt_note').id)
return res
@@ -342,10 +342,8 @@
<t t-if="not acquirer.country_ids or quotation and quotation.partner_id.country_id in acquirer.country_ids">
<label t-if="buttons.get(acquirer.id)">
<input t-att-value="acquirer.id" type="radio" name="acquirer" t-att-checked="acquirers[0] == acquirer"/>
<img class="media-object" style="width: 60px; display: inline-block;"
t-att-title="acquirer.name"
t-att-src="'/payment_%s/static/src/img/%s_icon.png' % (acquirer.provider, acquirer.provider)"/>
<span t-field="acquirer.name"/>
<span itemprop="image" t-field="acquirer.image_small" t-options="{'widget': 'image', 'style':'max-width: 60px; display: inline-block;'}"/>
<span t-field="acquirer.name"/>
</label>
<t t-set="payment_methods_available" t-value="True"/>
</t>