mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-24 23:52:02 +02:00
19.0 vanilla
This commit is contained in:
parent
e1d89e11e3
commit
a1f02d8cc7
225 changed files with 2335 additions and 775 deletions
|
|
@ -1095,3 +1095,20 @@ class TestExpenses(TestExpenseCommon):
|
|||
|
||||
# Check that there is no fourth autobalancing line on the account move
|
||||
self.assertEqual(expense.account_move_id.line_ids.mapped('balance'), [86.96, 13.04, -100.0])
|
||||
|
||||
def test_remove_company_id_from_hr_expense(self):
|
||||
expense = self.create_expenses({
|
||||
'name': 'Company PC 1000 + 15%',
|
||||
'employee_id': self.expense_employee.id,
|
||||
'product_id': self.product_c.id,
|
||||
'total_amount_currency': 1000.00,
|
||||
'date': '2021-10-12',
|
||||
'payment_mode': 'company_account',
|
||||
'company_id': self.company_data['company'].id,
|
||||
'tax_ids': [Command.set(self.tax_purchase_a.ids)],
|
||||
})
|
||||
form = Form(expense)
|
||||
form.company_id = self.env['res.company']
|
||||
self.assertEqual(form.is_editable, False)
|
||||
form.company_id = self.env.company
|
||||
self.assertEqual(form.is_editable, True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue