Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
subcontracting MRP equipment manufacturing BoM
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
subcontracting MRP equipment manufacturing BoM
O tym forum
  1. MRP
  2. Forum

AssertionError: precision_rounding must be positive, got 0.0

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
mrpinventoryworkordersales.ordermultiwarehouse
1 Odpowiedz
3963 Widoki
Awatar
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
Awatar
Odrzuć
Cruz

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

Awatar
Gracious Joseph
Najlepsza odpowiedź

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
Awatar
Odrzuć
Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Real Cost Perpetual Inventory Value
mrp inventory
Awatar
Awatar
1
wrz 25
5718
Stock cost price from MRP/BOM
mrp inventory
Awatar
Awatar
1
maj 22
2807
Product Access Denied Rozwiązane
mrp inventory
Awatar
Awatar
1
maj 22
5937
How to solve delay in validate transfer
mrp inventory
Awatar
0
mar 22
3275
Odoo Server Error - You can not change the finished work order.
mrp workorder
Awatar
Awatar
Awatar
2
sty 20
6498
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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