You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

22 lines
1.0 KiB

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- Inherited the form view of res_users in order to add fields
for restricting products.-->
<record id="view_users_form" model="ir.ui.view">
<field name="name">res.users.view.form.inherit.product.restriction.users</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Allowed Products" invisible="is_admin">
<label for="restricted_type" string="Restriction Type"/>
<field name="restricted_type" widget="radio"/>
<field name="allowed_product_ids"
invisible="restricted_type != 'product'"/>
<field name="allowed_product_category_ids"
invisible="restricted_type != 'category'"/>
</page>
</xpath>
</field>
</record>
</odoo>