Skip to Content
Menu
This question has been flagged
2 Replies
2668 Views

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
Discard
Best Answer

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
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
2
Jul 24
358
3
Nov 23
625
1
Aug 23
733
1
Jul 23
1083
0
Dec 22
1493