Update project_invoice
This commit is contained in:
parent
5f3f52ec2e
commit
aa752239cb
|
|
@ -180,6 +180,8 @@ class ProjectInvoice(models.Model):
|
||||||
'invoice_line_ids': [],
|
'invoice_line_ids': [],
|
||||||
'company_id': self.company_id.id,
|
'company_id': self.company_id.id,
|
||||||
'invoice_date_due': self.plan_payment_date,
|
'invoice_date_due': self.plan_payment_date,
|
||||||
|
'res_model':'project.invoice',
|
||||||
|
'res_id':self.id
|
||||||
}
|
}
|
||||||
elif self.project_id.type == 'expense':
|
elif self.project_id.type == 'expense':
|
||||||
journal = self.env['account.move'].sudo().with_context(default_move_type='in_invoice')._get_default_journal()
|
journal = self.env['account.move'].sudo().with_context(default_move_type='in_invoice')._get_default_journal()
|
||||||
|
|
@ -196,6 +198,8 @@ class ProjectInvoice(models.Model):
|
||||||
'purchase_id': self.invoice_type== 'consultant' and False or self.project_id.purchase_order_id.id ,
|
'purchase_id': self.invoice_type== 'consultant' and False or self.project_id.purchase_order_id.id ,
|
||||||
'company_id': self.company_id.id,
|
'company_id': self.company_id.id,
|
||||||
'invoice_date_due': self.plan_payment_date,
|
'invoice_date_due': self.plan_payment_date,
|
||||||
|
'res_model':'project.invoice',
|
||||||
|
'res_id':self.id
|
||||||
}
|
}
|
||||||
return invoice_vals
|
return invoice_vals
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue