Hi everyone,
i would to get value from Many2one field, and put it in other field readonly.
here is my code :
code_BL=fields.Many2one("stock.picking",string='BL code',required=True,)partner=fields.Many2one("res.partner")
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi everyone,
i would to get value from Many2one field, and put it in other field readonly.
here is my code :
code_BL=fields.Many2one("stock.picking",string='BL code',required=True,)partner=fields.Many2one("res.partner")
Hello CZN SARL
You can used field onchamnge or set readonly from xml or py file for this fields.
Please find code in comment.
I hope This will help you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
For example.
sale_id = field.Many2one('sale.order')
partner_id = field.Many2one('res.partner', readonly="True")
def sale_id_onchange(self):
self.partner_id = sale_id.partner_id.id
Hi,
You can use 'related' attribute to achieve this.
For example to get mobile number from partner
mobile_number = fields.Char(string='Mobile No, related='partner_id.mobile')
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
Display values of dropdown in a many2one field
Diselesaikan
|
|
2
Feb 25
|
5873 | |
|
1
Des 24
|
1440 | ||
Set default value in object of many2one field
Diselesaikan
|
|
1
Nov 22
|
15934 | |
How to remove Create and Edit in many2one field.?
Diselesaikan
|
|
3
Agu 22
|
12960 | |
|
0
Jul 22
|
836 |