[FIX] hr_commission,hr_payroll_commission: fix linking commission payment

Additionally `hr_commission`: test archive contracts in case someone moves one to running
This commit is contained in:
Jared Kipe
2022-03-22 17:01:12 +00:00
committed by Leo Pinedo
parent 8dfd287c4a
commit aaa31092ee
2 changed files with 4 additions and 2 deletions

View File

@@ -10,6 +10,8 @@ class TestCommission(common.TransactionCase):
super().setUp()
self.user = self.browse_ref('base.user_demo')
self.employee = self.browse_ref('hr.employee_qdp') # This is the employee associated with above user.
# arcive all current contracts
self.employee.contract_ids.write({'active': False})
def _createUser(self):
return self.env['res.users'].create({

View File

@@ -20,8 +20,8 @@
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='default_account_id' and @attrs=&quot;{'required': [('type', '=', 'purchase')], 'invisible': [('type', '!=', 'purchase')]}&quot;]" position="attributes">
<attribute name="attrs">{'required': [('type', '=', 'purchase')], 'invisible': [('type', 'not in', ('purchase', 'general'))]}</attribute>
<xpath expr="//field[@name='default_account_type']" position="after">
<field name="default_account_id" string="Default Account" attrs="{'invisible': [('type', '!=', 'general')]}" groups="account.group_account_readonly"/>
</xpath>
</field>
</record>