[IMP] hr_contract: prevent dialog opening on contract history

clicking on the row of contract history opens the formViewDialog

so this commit fixes the issue by adding the readonly attributes
on the field so that clicking on the row of the contract history
doesn't open the formViewDialog

TaskID-2578874

closes odoo/odoo#73832

Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
Hardik Prajapati
2021-07-19 07:23:41 +00:00
parent 7d0d090ea5
commit f8137cf900
@@ -77,14 +77,15 @@
</group>
<notebook>
<page string="Contract History" name="contract_history">
<field name="contract_ids" widget="one2many">
<field name="contract_ids" widget="one2many" readonly="0">
<tree string="Current Contracts"
decoration-primary="state == 'open'"
decoration-muted="state == 'close'"
decoration-bf="id == parent.contract_id"
default_order = "date_start desc, state desc"
editable="bottom"
no_open="1">
no_open="1"
create="0" delete="0">
<button name="action_open_contract_form" type="object" icon="fa-external-link"/>
<field name="id" invisible="1"/>
<field name="name" string="Contract Name"/>