I want to see only current user record for user group(Trade User Group
) and All users details(Trade Manager Group
) ,don’t have privilege of deleting, modifying his record for (Trade User) .
Also only menuitem (Trade User Group) wants to access. Then
How to add record rule and user groups for these two group users…
Trade User Group
Trade Manager Group
This is my code-----
<record id="group_seat_trade_user" model="res.groups">
<field name="name">Trade User </field>
</record>
<record id="group_seat_trade_manager" model="res.groups">
<field name="name">Trade Manager </field>
</record>
Record Rule like ,Here what is domain_force?
<record model="ir.rule" id="ir_values_my_rule">
<field name="name"> Rule1 Name</field>
<field name="model_id" ref="model_
trade_user'"/>
<field name="domain_force">[('field','operator','value'),('user_id','=',user.id)]</field>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_unlink" eval="True"/>
<field name="perm_create" eval="True"/>
</record>
This is my model
class TradeUSser(models.Model):
_name =’ trade.user'
name = fields.Char(Name')
user_type=fields.Char(‘Type’)
XML
<record id="view_service_lineform_details" model="ir.ui.view">
<field name="name">= trade.user.form</field>
<field name="model">= trade.user </field>
<field name="arch" type="xml">
<form string="Service Details">
<group>
<field name=" name " />
<field name=" user_type " />
</group>
</form>
</field>
</record>
<record id="action_customer_info_details" model="ir.actions.act_window">
<field name="name">Customer Details</field>
<field name="res_model"> trade.user </field>
<field name="view_type">form</field>
<field name="view_mode">tree,form </field>
</record>
<menuitem id="main_booking_menu_id" name="Test" sequence="0" />
<menuitem name="Service Details" id="main_booking_menu_id_service" parent="main_booking_menu_id" action=" action_customer_info_details " sequence="1" />