[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:
qdp-odoo
2017-01-30 12:08:19 +01:00
parent 73b320a3f7
commit 602d04117a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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"/>