Browse Source

do not update origin because this field is only for supplier reference, not visible in customer invoices

pull/150/head
yk2kus 7 years ago
parent
commit
e34238060a
  1. 4
      contract/models/account_analytic_account.py

4
contract/models/account_analytic_account.py

@ -169,14 +169,14 @@ class AccountAnalyticAccount(models.Model):
self.company_id.currency_id self.company_id.currency_id
) )
invoice = self.env['account.invoice'].new({ invoice = self.env['account.invoice'].new({
'reference': self.code,
# 'reference': self.code,
'type': 'out_invoice', 'type': 'out_invoice',
'partner_id': self.partner_id.address_get( 'partner_id': self.partner_id.address_get(
['invoice'])['invoice'], ['invoice'])['invoice'],
'currency_id': currency.id, 'currency_id': currency.id,
'journal_id': journal.id, 'journal_id': journal.id,
'date_invoice': self.recurring_next_date, 'date_invoice': self.recurring_next_date,
'origin': self.name,
'origin': '[' + self.code +'] ' + self.name if self.code else self.name,
'company_id': self.company_id.id, 'company_id': self.company_id.id,
'contract_id': self.id, 'contract_id': self.id,
'user_id': self.partner_id.user_id.id, 'user_id': self.partner_id.user_id.id,

Loading…
Cancel
Save