Hello,
I created a field in the BILL OF MATERIAL and want to show it as readonly in the work order form so may anyone help.
Waiting for a reply!
Thanks in advance.
Hello,
I created a field in the BILL OF MATERIAL and want to show it as readonly in the work order form so may anyone help.
Waiting for a reply!
Thanks in advance.
Hi,
You can add a related field for this, suppose if you have a field named field_1 in bom model and if you need to show the same in the work order form, add a new field to work order model and give relation as this:
field_1 = fields.Char(related='production_id.bom_id.field_1')
To know more about related fields in odoo, see: https://www.youtube.com/watch?v=rLlUQ9GAan8
Thanks
Thanks that worked with me.
Hello, I have another question .
I wanted to add a field to enter how many times the user can print the report and if he want to exceed the number entered to the field he will get a maasage saying you cant print reports anymore. So can you help please.
Hello,
Here is the example of related field.
Ex.
number = fields.Char(related='partner_id.phone', string='Number')
If you can get phone number from customer, you add related field like this.
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
Many2many fields
Résolu
|
2
mars 23
|
5597 | ||
|
2
juil. 22
|
3841 | |||
|
0
mai 26
|
40 | |||
|
0
sept. 23
|
3596 | |||
|
2
avr. 23
|
8079 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.