Merge pull request #1053 from expsa/project_account

Update project_invoice
This commit is contained in:
zainab2097 2024-09-09 17:36:22 +03:00 committed by GitHub
commit f1d1756f0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -10,7 +10,7 @@
""",
'category': 'Odex25-Project/Odex25-Project',
'version': '1.0',
'depends': ['sale_timesheet','hr' ,'project','mail', 'portal', 'base' ,'account'],
'depends': ['sale_timesheet','hr' ,'project','mail', 'portal', 'base' ,'account','account_attachments'],
'data': [
'data/project_data.xml',
'data/project_cron.xml',

View File

@ -180,6 +180,8 @@ class ProjectInvoice(models.Model):
'invoice_line_ids': [],
'company_id': self.company_id.id,
'invoice_date_due': self.plan_payment_date,
'res_model':'project.invoice',
'res_id':self.id
}
elif self.project_id.type == 'expense':
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 ,
'company_id': self.company_id.id,
'invoice_date_due': self.plan_payment_date,
'res_model':'project.invoice',
'res_id':self.id
}
return invoice_vals