mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[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:
@@ -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({
|
||||
|
||||
@@ -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="{'required': [('type', '=', 'purchase')], 'invisible': [('type', '!=', 'purchase')]}"]" 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>
|
||||
|
||||
Reference in New Issue
Block a user