[FIX] hr_expense: partner on AML

- Create a partner who is a contact of a company
- Associate this partner to an employee
- Create an expense for the employee, validate and post entries

The AML created are linked to the company, not the partner.

Since the bank account account is registered on the partner, and not the
company, this is more logical to link the AML with the partner.

opw-724550
This commit is contained in:
Nicolas Martinelli
2017-03-21 13:36:19 +01:00
parent 1213920e40
commit d69aa2d98b
+1 -1
View File
@@ -120,7 +120,7 @@ class HrExpense(models.Model):
'''
This function prepares move line of account.move related to an expense
'''
partner_id = self.employee_id.address_home_id.commercial_partner_id.id
partner_id = self.employee_id.address_home_id.id
return {
'date_maturity': line.get('date_maturity'),
'partner_id': partner_id,