Merge pull request #1164 from expsa/fix_total
Update project_invoice.py
This commit is contained in:
commit
d8c81e79f7
|
|
@ -53,10 +53,11 @@ class ProjectInvoice(models.Model):
|
|||
string="Allowed Internal Users", default=lambda self: self.env.user, domain=[('share', '=', False)])
|
||||
allowed_portal_user_ids = fields.Many2many('res.users', 'project_invoice_allowed_portal_users_rel', string="Allowed Portal Users", domain=[('share', '=', True)])
|
||||
|
||||
@api.onchange("project_invline_ids.project_invoice_id")
|
||||
@api.onchange("project_invline_ids")
|
||||
def get_price_unit_value_test(self):
|
||||
for rec in self.project_invline_ids:
|
||||
rec.price_unit = rec.project_invoice_id.project_id.contract_value_untaxed
|
||||
if rec.price_unit!=0.00:
|
||||
rec.price_unit = rec.project_invoice_id.project_id.contract_value_untaxed
|
||||
|
||||
|
||||
@api.depends('invoice_id','invoice_id.invoice_payments_widget','name')
|
||||
|
|
|
|||
Loading…
Reference in New Issue