[FIX] hr_expense: don't try to create twice the taxes journal item from hr.expense when one is given. Fixes #15181 Also fix the domain on applicable taxes to filter the purchase taxes only
This commit is contained in:
@@ -254,7 +254,7 @@ class HrExpense(models.Model):
|
||||
|
||||
#convert eml into an osv-valid format
|
||||
lines = map(lambda x:(0, 0, expense._prepare_move_line(x)), move_lines)
|
||||
move.write({'line_ids': lines})
|
||||
move.with_context(dont_create_taxes=True).write({'line_ids': lines})
|
||||
expense.write({'account_move_id': move.id, 'state': 'post'})
|
||||
if expense.payment_mode == 'company_account':
|
||||
expense.paid_expenses()
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<field name="quantity" class="oe_inline"/>
|
||||
<field name="product_uom_id" widget="selection" class="oe_inline" groups="product.group_uom"/>
|
||||
</div>
|
||||
<field name="tax_ids" widget="many2many_tags" groups="account.group_account_user"/>
|
||||
<field name="tax_ids" widget="many2many_tags" groups="account.group_account_user" domain="[('type_tax_use', '=', 'purchase')]"/>
|
||||
</group><group>
|
||||
<field name="date"/>
|
||||
<field name="employee_id"/>
|
||||
|
||||
Reference in New Issue
Block a user