This question has been flagged
1 Reply
114 Views

Hello Odooers,

Can I add a new value in print_format field using the inherited view? I know I can't add value using Odoo Studio or in Technical-->Database Structure-->Fields since it is a base field. However, is there any way to modify or add value using an inherited view? I'm using Odoo 17 Enterprise Edition.

I try to create a new field with similar selection values of print_format, then replace the print_format field with the field I created in the inherited views. Whenever I downloaded different formats, it downloaded the 2x7 format for all formats. I want to add 8x24 format in the print_format field. Thank you. 

Avatar
Discard
Author

Hello Niyas,
Thank you for your feedback, yes, I want to add a new option in the print product label wizard pop-up which is under print_format selection field. I can't add a value in print_label since it is a Base Field. That's why I created a new custom selection field with a value of only 8x24. When I try to add it to the form view, see the result in the image below:
https://i.postimg.cc/8C248JN0/Screenshot-2024-03-29-020435.png
The 2x7 format is selected as default, and when I select 8x24 format it will still select the 2x7 format. As a result, I have selected 2 formats. I tried to unable the set default option but I didn't find the default option for the print_format field.

Best Answer

Hi,
I believe you are looking to add a new option in the print product label pop up (based on previous question asked), it is fine to add a new selection to that list, but depending on the new selection value, you need to adjust further code to take the new template, which you will create for 8 * 24

What you need to do is:


* Add new selection value named 8*24
* create new template for 8*24
* adjust the code to choose to take new template when 8*24 is selected


Thanks

Avatar
Discard