Dolibarr 19.0.2 Unable to set default product unit

I cannot find a way to set the product default unit to “Piece” (row 28 in the llx_c_Units table in the database), actually it is set to “TON”
In the Other Settings there’s not option to set the default Unit, I only have these:

  • MAIN_VOLUME_DEFAULT_ROUND ► Accuracy of volume (number of decimals)

  • MAIN_VOLUME_DEFAULT_UNIT ► Default unit for weight (0=kg, -3=g, …)

  • MAIN_WEIGHT_DEFAULT_ROUND ► Accuracy of weight (number of decimals)

  • MAIN_WEIGHT_DEFAULT_UNIT ► Default unit for weight (0=kg, -3=g, …)*

I asked chatgpt how to change it and it gave to me this procedure:

Changing the Default Unit

If the “Unit” field default is set to “ton” and you want to change this default value:

  1. Access Setup Configuration:
  • Go to Setup from the main menu.
  • Select Modules/Applications and then navigate to Products/Services.
  1. Adjust Product Attributes:
  • Look for an option to manage product attributes or fields. This may be under Product options or a similar heading.
  1. Modify Default Values:
  • Locate the “Unit” field and check if there’s an option to set its default value.
  • Change the default value from “ton” to the desired unit, e.g., “kg” or “pcs”.

but the Unit option is not available there.
So how can I set the unit default value for new products?

Hi @charlycm

Setup->Other Setup use option PRODUCT_USE_UNITS with value 1
Setup->Dictionaries->Measuring Units enable or add and enable the desired units

Then go and modify your product, the unit option will be there

Thank you for your reply.
My problem is not that I cannot see the Units in Product module, my problem is that the default unit is set to “TON” and want it to be “PIECE”

image

If you disable ton from dictionary then default will be PIECE

I disable it, now the default Unit is Kg.
image

Is it that hard to change the default unit?

I think Setup → “Default values” is the right way to change this

I had this problem after the update too.
I solved the problem with database intervention.