Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
subcontracting MRP equipment manufacturing BoM
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
subcontracting MRP equipment manufacturing BoM
Sul forum
  1. MRP
  2. Forum

AssertionError: precision_rounding must be positive, got 0.0

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
mrpinventoryworkordersales.ordermultiwarehouse
1 Rispondi
3965 Visualizzazioni
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
Abbandona
Cruz

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

Avatar
Gracious Joseph
Risposta migliore

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
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Real Cost Perpetual Inventory Value
mrp inventory
Avatar
Avatar
1
set 25
5718
Stock cost price from MRP/BOM
mrp inventory
Avatar
Avatar
1
mag 22
2807
Product Access Denied Risolto
mrp inventory
Avatar
Avatar
1
mag 22
5940
How to solve delay in validate transfer
mrp inventory
Avatar
0
mar 22
3278
Odoo Server Error - You can not change the finished work order.
mrp workorder
Avatar
Avatar
Avatar
2
gen 20
6498
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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