Dear Jihen BEN ALI,
try this code may be used for you.
<field name="your field name" groups="group id"/>
or
You should create security file and assign that group in fielda.
If you dont know how to create security file then follow below step and hope you will get answer
You have to create ir.model.access.csv in your module, I suggest you to create a security folder and put security related file there
Like security/ir.model.access.csv and security/given_any_name_security.xml
Change in openerp.py file like 'security/given_any_name_security.xml, 'security/ir.model.access.csv'
Inside xml file you sholud create group like
<?xml version="1.0" ?>
<openerp>
<data noupdate="1">
<record model="ir.module.category" id="module_school_category">
<field name="name">School</field>
<field name="description">School</field>
<field name="sequence">16</field>
</record>
<record id="group_school_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="module_school_category" />
</record>
<record id="group_school_manager" model="res.groups">
<field name="name">Manager</field>
<field name="implied_ids" eval="[(4, ref('group_school_user'))]" />
<field name="category_id" ref="module_school_category" />
<field name="users" eval="[(4, ref('base.user_root'))]" />
</record>
</data>
</openerp>
Inside csv file you should give the permission like
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_student_student_manager,student.student,model_student_student,group_school_manager,1,1,1,1
access_student_student_user,student.student,model_student_student,group_school_user,1,1,0,0
access_hobby_hobby_manager,hobby.hobby,model_hobby_hobby,group_school_user,1,1,1,1
access_hobby_hobby_user,hobby.hobby,model_hobby_hobby,group_school_user,1,1,0,0
Now in your view file to add group in field like
<field name="many2one_field" groups="module_name.group_id"/>
here groups define the value of module_name.group_id that means
group_id: group id which is define in security xml file
Example:
<field name="hobby_id" groups="school_management.group_school_manager"/>
Finally update the module
Hope this code is usefully for you.
Thanks & Regards
Ankit H Gandhi
Are you asking how you add this field to the User Interface? That would be via a VIEW - create your own view via XML either directly in the UI or via a module XML file.
Also, there is already a credit limit module - perhaps you can modify it to meet your needs? https://apps.openerp.com/apps/modules/8.0/partner_credit_limit/
My question is how can I display this new field for the selected customer in the regulation part after creating his bill