Skip to content

Commit

Permalink
Merge pull request #4361 from lefilament/16.0-ou-imp-ir_rules
Browse files Browse the repository at this point in the history
[16.0][OU-IMP] account, hr_holidays: update multi-company ir_rule
  • Loading branch information
pedrobaeza authored Mar 28, 2024
2 parents 5cb76b4 + bf163b6 commit 780ae23
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="account_bank_statement_comp_rule" model="ir.rule">
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="account_bank_statement_line_comp_rule" model="ir.rule">
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<!-- Don't recreate this, as they are usually touched by users and in fact the changes are only to use Command syntax
<record id="account_payment_term_15days" model="account.payment.term">
<field name="line_ids" eval="[Command.clear(), Command.create({'value': 'balance', 'value_amount': 0.0, 'days': 15})]"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,20 @@
('employee_id.leave_manager_id', '=', user.id),
]</field>
</record>
<record id="hr_leave_allocation_rule_multicompany" model="ir.rule">
<field name="domain_force">[
'|',
('employee_id', '=', False),
('employee_id.company_id', 'in', company_ids),
('holiday_status_id.company_id', 'in', company_ids + [False])
]</field>
</record>
<record id="hr_leave_rule_multicompany" model="ir.rule">
<field name="domain_force">[
'|',
('employee_id', '=', False),
('employee_id.company_id', 'in', company_ids),
('holiday_status_id.company_id', 'in', company_ids + [False])
]</field>
</record>
</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def _set_allocation_validation_type(env):
@openupgrade.migrate()
def migrate(env, version):
_set_allocation_validation_type(env)
openupgrade.load_data(env.cr, "hr_holidays", "16.0.1.5/noupdate_changes.xml")
openupgrade.load_data(env.cr, "hr_holidays", "16.0.1.6/noupdate_changes.xml")

0 comments on commit 780ae23

Please sign in to comment.