Skip to content

Commit

Permalink
LBFYL
Browse files Browse the repository at this point in the history
  • Loading branch information
lasley committed Aug 23, 2017
1 parent a0c2439 commit 79ecd02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contract/models/account_analytic_contract_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models
from odoo import fields, models


class AccountAnalyticContractLine(models.Model):
Expand Down
10 changes: 4 additions & 6 deletions contract/models/account_analytic_invoice_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,15 @@ def _onchange_product_id(self):
self.uom_id.category_id.id):
vals['uom_id'] = self.product_id.uom_id

try:
if self.analytic_account_id._name == 'account.analytic.invoice.line':
date = (
self.analytic_account_id.recurring_next_date or
fields.Datetime.now()
)
except AttributeError:
date = fields.Datetime.now()

try:
partner = self.analytic_account_id.partner_id
except AttributeError:

else:
date = fields.Datetime.now()
partner = self.env.user.partner_id

product = self.product_id.with_context(
Expand Down

0 comments on commit 79ecd02

Please sign in to comment.