Displaying Sale Price with 2 Decimal Places Instead of 4 (e.g., 310.00 not 310.0000)

Hello,

I’m working on a university project using Tryton and I’ve decided to rely entirely on the standard base modules (like stock, product, party) because they cover all the required functionality — so I’m no longer using custom modules.

Now I’m facing a display issue with the sale price field for products. For example, when I enter 310, the system displays it as 310.0000, but I would like it to show as 310.00 (with only two decimal places).

Here’s what I’ve already configured:

  • Set the local currency to HNL (Honduran Lempira).
  • Assigned this currency to the user account I use to log in.
  • Verified that the Decimal Accuracy for prices is set to 2 digits.

Despite this, prices still appear with 4 decimal places.

:puzzle_piece: Question:
Is there a way to force the display to show only 2 decimal places (e.g., 310.00) when viewing product prices?

Any guidance or suggestions would be greatly appreciated.

Thanks in advance!

Best regards,
Hugo

You need to define it in your configuration file (Configuration file — Tryton server)

By default, the value is 4. But once the database is created, you cannot decrease this value.
So you have to define this parameter before the database is created.

See here: Configuration — Tryton module with products

...

[product]
price_decimal = 2

...