Update project_invoice.py

This commit is contained in:
zainab2097 2024-08-28 18:08:10 +03:00 committed by GitHub
parent 20b5511ba2
commit f0cf8aa774
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -158,6 +158,8 @@ class ProjectInvoice(models.Model):
invoice_vals = {
'move_type': 'out_invoice',
'currency_id': self.currency_id.id,
'ref': self.project_id.project_no,
'note': self.project_id.name,
'partner_id': self.invoice_type == 'consultant' and self.project_id.consultant_id.id or self.project_id.partner_id.id ,
'partner_shipping_id': self.project_id.partner_id.id,
'partner_bank_id': self.company_id.partner_id.bank_ids.filtered(
@ -172,6 +174,8 @@ class ProjectInvoice(models.Model):
invoice_vals = {
'move_type': 'in_invoice',
'currency_id': self.currency_id.id,
'ref': self.project_id.project_no,
'note': self.project_id.name,
'partner_id': self.invoice_type == 'consultant' and self.project_id.consultant_id.id or self.project_id.partner_id.id ,
'partner_shipping_id': self.project_id.partner_id.id,
'partner_bank_id': self.company_id.partner_id.bank_ids.filtered(