Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
4117 Visualizzazioni

Hi all I'm a freshman with odoo

Currently, I'm using odoo community ver 14 and also using an app named "Product Custom Fields"

My concern is this, I would like to add some custom fields item made from the Product Custom Fields on the "picking operation form"

Please let me know how to do this or which file should I need to edit or config

Many thanks in advance

Avatar
Abbandona
Risposta migliore

Hello,

You can inherit picking model and its view in custom module.

Create one py file and write _inheit = 'stock.picking' and define your custom fields in that file.

Now, create one xml file that inherit the picking form view using inherit_id and add your custom fields.

You can get idea from odoo base addons.

Thanks,

Avatar
Abbandona
Risposta migliore

Hi,

Seems you have added some new fields in the product form using the third party module and now you need to add the same fields in the picking form right ? This can be done either from the user interface or from the code, you can choose the method which is convenient for you.

Adding New Fields From User Inteface

To add new field from the user interface, you have activate the developer mode first, then navigate to Settings -> Technical -> Database Structure -> Models, search the corresponding model and add the new field there. Select the necessary field type and give a label for it.

Once the above is done field is added to the database table, now we have to add it to the views, to see it in the corresponding view.

Have a look at this video explaining the same: How to Add Custom Field From User Interface In Odoo


Adding New Field from Code/Module

For adding new field to an existing view from code, we have to inherit the corresponding model and add field first, then we will inherit the corresponding view and also add the field. We will be adding or doing the above as custom module.

See: How To Inherit And Add Field to Existing Views In Odoo


Once you add the new fields in the form, you might need to bring the values to this field from the product master, for that case, you can make use of the related fields concept.


Related Fields in Odoo: Related Fields in Odoo



Thanks

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
lug 24
1860
3
nov 23
2072
1
ago 23
2219
1
lug 23
2480
0
dic 22
2929