Calculated weight on Sales Order

I’m new to Dolibarr and testing it. I’m having difficulty finding where the setting is for the Calculated weight on the sales order and shipments tab. It’s showing in grams but I need it to show in imperial measurements ounces or pounds. I’ve turned off all metric measurements in Dictionaries > Measuring Units but it still shows the weight in grams.

On each individual product, have you defined its weight in in “x” number of ounces/pounds?

I’m not sure if that is your problem but could be a contributor.

Hope that helps.

Frank

Thank you for the suggestion. Checked and the product weight is in ounces.

which dolibarr version @cindy ?

Version 21.0.2

Hello :slight_smile:

can you try to set “MAIN_WEIGHT_DEFAULT_UNIT” to 98 for ounces or to 99 for pounds
in “Setup” - “Other setup” function

Good continuation

Thank you for your suggestion. I tried it and it changes the weight to KG. I did an internet search with the new information and it looks like this has been a problem for a while. I found this fix but trying it just crashes the program - [BUG] MAIN_WEIGHT_DEFAULT_UNIT doesn't work for Ounce & Pound · Issue #10299 · Dolibarr/dolibarr · GitHub

Here are the code changes back then - they might have changed since

I just tried to get the value of MAIN_WEIGHT_DEFAULT_UNIT in my Dolibarr 21.0.1 and the answer is:

{
  "error": {
    "code": 400,
    "message": "Bad Request: Error Bad or unknown value for constantname"
  }
}

@pcbleu how do we know what value corresponds to which unit?

Hello :slight_smile:

Lokk at Setup - Dictionaries - Measuring units :

Good continuation

@cindy which of your units are enabled?

Everything is turned off except - ounce, pound, foot, inch, and the date and time units.

This is the product setting: