3

I want to either increase the number of decimals that are shown in the product volume field or change the unit to something smaller. By default it's m^3 and of course that is to high for my product sizes.

I tried looking in the Technical tab but couldn't find anything related. Maybe I need to create a custom field in the Decimal Accuracy section.

The field is "volume" and is part of "product.template".

Is there a none inherited module way of doing this?

This is Odoo 11.0+e-20171218. Thank you.

Trody
  • 403
  • 5
  • 17

1 Answers1

0

Note: I don't have access to Odoo Enterprise but since this is a basic feature I'm assuming that the respective code sections are identical. My answer is referring to Odoo version 11.0-20180416.

Is there a none inherited module way of doing this?

Short answer: unfortunately, no.

Long answer: Even though the decimal accuracy of many float fields can be modified by adding/altering values at Settings > Technical > Database Structure > Decimal Accuracy (after installing module decimal_precision) there is currently no way of changing the decimal accuracy for the volume field on product templates - at least not without writing a tiny custom module which I understand you don't want to do.

The reason for this is that in the source code the parameter digits is missing for the volume field.

Screenshot Code official product_template.py src: Github Odoo 11 source-code

As you can see in the screenshot the weight field has this attribute, that's why it's possible to change the decimal accuracy for the product weight by adding "Stock Weight" with the desired digit count in the decimal accuracy settings.

If you change your mind and need help writing the small module to set the decimal accuracy for the volume, then please update your question with the code you have so far and write a comment below my answer so I get a notification.

coreuter
  • 3,331
  • 4
  • 28
  • 74