Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
subcontracting MRP equipment manufacturing BoM
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
subcontracting MRP equipment manufacturing BoM
O tomto fóru
  1. MRP
  2. Fórum

AssertionError: precision_rounding must be positive, got 0.0

Odebírat

Get notified when there's activity on this post

This question has been flagged
mrpinventoryworkordersales.ordermultiwarehouse
1 Odpovědět
3958 Zobrazení
Avatar
kelvin leonardi

Hello

I have problems in manufacturing odoo. So when I have a production order and will do a production on a work order I get an error like this:

" Error:Odoo Server Error


Traceback (most recent call last):

  File "/home/printart/printart-odoo/odoo/http.py", line 619, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/home/printart/printart-odoo/odoo/http.py", line 309, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/home/printart/printart-odoo/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/home/printart/printart-odoo/odoo/http.py", line 664, in dispatch

    result = self._call_function(**self.params)

  File "/home/printart/printart-odoo/odoo/http.py", line 345, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/home/printart/printart-odoo/odoo/service/model.py", line 93, in wrapper

    return f(dbname, *args, **kwargs)

  File "/home/printart/printart-odoo/odoo/http.py", line 338, in checked_call

    result = self.endpoint(*a, **kw)

  File "/home/printart/printart-odoo/odoo/http.py", line 909, in __call__

    return self.method(*args, **kw)

  File "/home/printart/printart-odoo/odoo/http.py", line 510, in response_wrap

    response = f(*args, **kw)

  File "/home/printart/printart-odoo/addons/web/controllers/main.py", line 1403, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/home/printart/printart-odoo/addons/web/controllers/main.py", line 1391, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/home/printart/printart-odoo/odoo/api.py", line 395, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/home/printart/printart-odoo/odoo/api.py", line 382, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/home/printart/printart-odoo/addons/sales_upload_files/models/mrp_workorder.py", line 13, in record_production

    super(MrpWorkorder, self).record_production()

  File "/home/printart/printart-odoo/addons/mrp/models/mrp_workorder.py", line 412, in record_production

    self._update_finished_move()

  File "/home/printart/printart-odoo/addons/mrp/models/mrp_abstract_workorder.py", line 273, in _update_finished_move

    float_round(self.qty_producing, precision_rounding=rounding)

  File "/home/printart/printart-odoo/odoo/tools/float_utils.py", line 55, in float_round

    precision_rounding=precision_rounding)

  File "/home/printart/printart-odoo/odoo/tools/float_utils.py", line 30, in _float_check_precision

    "precision_rounding must be positive, got %s" % precision_rounding

AssertionError: precision_rounding must be positive, got 0.0"


Strangely, I only get this error in one of my warehouses (I use multi warehouse). when in another warehouse I don't get that error. then how can you solve that problem


Please Help 

Thanks 

0
Avatar
Zrušit
Cruz

Hi,
How did you solve this one?
I got a similar error.

Avatar
Gracious Joseph
Nejlepší odpověď

The error "AssertionError: precision_rounding must be positive, got 0.0" occurs when Odoo encounters a precision_rounding value of 0.0 during a computation. This typically happens due to an incorrect configuration of UoM (Unit of Measure) or decimal precision. Here's how you can resolve the issue:

1. Root Cause

  • The Unit of Measure (UoM) or related settings in the specific warehouse might not have a proper Rounding Precision configured.
  • Odoo uses precision_rounding to handle quantities in calculations. A value of 0.0 means the rounding is improperly set, which leads to this error.
  • The issue only occurs in one warehouse because UoM settings or BOM (Bill of Materials) configurations may differ between warehouses.

2. Steps to Resolve

Step 1: Check Units of Measure (UoM) Configuration

  1. Navigate to:
    • Inventory > Configuration > Units of Measure.
  2. Open the UoMs related to the affected product(s).
  3. Verify the following:
    • Rounding Precision: Ensure it is set to a positive value (e.g., 0.01 or 0.001 depending on your needs).
      • Rounding precision determines the smallest unit of quantity Odoo will handle.
    • Category: Ensure the UoM is correctly categorized under the same category as other UoMs for the product.
  4. Save the changes and test again.

Step 2: Verify Product Configuration

  1. Go to:
    • Inventory > Products > Products.
  2. Open the affected product(s).
  3. Check the following fields:
    • Unit of Measure and Purchase Unit of Measure: Ensure these have valid UoMs with proper rounding precision.
    • Routes: Ensure the product's routes (Make-to-Stock, Manufacture, etc.) align with the warehouse configuration.

Step 3: Check Bill of Materials (BOM)

  1. Navigate to:
    • Manufacturing > Products > Bill of Materials.
  2. Open the BOM associated with the product being manufactured in the affected warehouse.
  3. Check the following:
    • Component Quantities: Ensure all component quantities and UoMs are configured with appropriate rounding precisions.
    • Finished Product UoM: Verify the UoM for the finished product has a valid rounding precision.

Step 4: Verify Warehouse Configuration

  1. Navigate to:
    • Inventory > Configuration > Warehouses.
  2. Open the settings for the affected warehouse.
  3. Check:
    • Routes: Ensure the routes for manufacturing and stock movements are consistent with other warehouses.
    • Stock Locations: Verify stock location configurations (e.g., for raw materials and finished goods) do not have custom logic causing conflicts.

Step 5: Debug Logs and Server Action

If the issue persists:

  1. Enable Developer Mode in Odoo.
  2. Check the logs for the specific product or production order causing the error:
    • Go to Settings > Technical > Logs > Server Logs.
  3. Trace the affected rounding value being passed to float_round.

Step 6: Custom Code or Add-ons

  • The stack trace mentions a custom module (sales_upload_files/models/mrp_workorder.py) which may override the standard record_production method.
  • If custom code is involved:
    • Review the custom logic to ensure it doesn’t improperly set precision_rounding to 0.0.
    • Modify the code to include a fallback for rounding precision:
      rounding = rounding or 0.01  # Set a default positive value if rounding is 0.0
      

3. Preventive Actions

  1. Consistency Across Warehouses:
    • Ensure that UoMs and product configurations are consistent across all warehouses.
  2. Test Configurations:
    • Test manufacturing flows for each warehouse after changes.
  3. Regular Audits:
    • Periodically audit UoM configurations and rounding precisions to avoid similar issues.

4. If Issue Persists

  • If none of the above steps resolve the issue, you may need to:
    • Run a database query to identify products or UoMs with invalid configurations.
    • Contact Odoo support or your developer to debug the custom module mentioned in the error trace.

By following these steps, you should be able to resolve the issue and prevent it from recurring. Let me know if you need further assistance!

0
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Real Cost Perpetual Inventory Value
mrp inventory
Avatar
Avatar
1
zář 25
5715
Stock cost price from MRP/BOM
mrp inventory
Avatar
Avatar
1
kvě 22
2804
Product Access Denied Vyřešeno
mrp inventory
Avatar
Avatar
1
kvě 22
5929
How to solve delay in validate transfer
mrp inventory
Avatar
0
bře 22
3264
Odoo Server Error - You can not change the finished work order.
mrp workorder
Avatar
Avatar
Avatar
2
led 20
6493
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now