The `is_subcontracting_location` setting is intended only for complicated route/rule use cases therefore we make it visible only in debug mode to prevent users from setting this value and unintentionally creating a lot of new routes/rules unnecessary. Additionally, it is expected that users who previously set these up manually will not want their custom rules/routes changed but will still need the existing behavior to continue, so we restore the previous check for subcontracting locations set as sublocations of the primary company subcontracting location. Follow up to task: 2720393 Part-of: odoo/odoo#100219
14 lines
657 B
XML
14 lines
657 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_location_form" model="ir.ui.view">
|
|
<field name="name">stock.location.form</field>
|
|
<field name="model">stock.location</field>
|
|
<field name="inherit_id" ref="stock.view_location_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='return_location']" position='after'>
|
|
<field name="is_subcontracting_location" groups="base.group_no_one" attrs="{'invisible': [('usage', '!=', 'internal')]}" readonly="context.get('default_is_subcontracting_location', False)"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|