Browse Source
[FIX] contract: Operator issue in price get
* Add a default date in the instance that an analytic account doesn’t exist (templates) - fixes #68
pull/69/head
Dave Lasley
8 years ago
No known key found for this signature in database
GPG Key ID: 7DDBA4BA81B934CF
1 changed files with
6 additions and
1 deletions
-
contract/models/account_analytic_invoice_line.py
|
@ -68,11 +68,16 @@ class AccountAnalyticInvoiceLine(models.Model): |
|
|
self.uom_id.category_id.id): |
|
|
self.uom_id.category_id.id): |
|
|
vals['uom_id'] = self.product_id.uom_id |
|
|
vals['uom_id'] = self.product_id.uom_id |
|
|
|
|
|
|
|
|
|
|
|
date = ( |
|
|
|
|
|
self.analytic_account_id.recurring_next_date or |
|
|
|
|
|
fields.Datetime.now() |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
product = self.product_id.with_context( |
|
|
product = self.product_id.with_context( |
|
|
lang=self.analytic_account_id.partner_id.lang, |
|
|
lang=self.analytic_account_id.partner_id.lang, |
|
|
partner=self.analytic_account_id.partner_id.id, |
|
|
partner=self.analytic_account_id.partner_id.id, |
|
|
quantity=self.quantity, |
|
|
quantity=self.quantity, |
|
|
date=self.analytic_account_id.recurring_next_date, |
|
|
|
|
|
|
|
|
date=date, |
|
|
pricelist=self.analytic_account_id.pricelist_id.id, |
|
|
pricelist=self.analytic_account_id.pricelist_id.id, |
|
|
uom=self.uom_id.id |
|
|
uom=self.uom_id.id |
|
|
) |
|
|
) |
|
|