Skip to Content
Odoo เมนู
  • ลงชื่อเข้าใช้
  • ทดลองใช้ฟรี
  • แอป
    การเงิน
    • ระบบบัญชี
    • ระบบการออกใบแจ้งหนี้
    • ระบบบัญชีรายจ่าย
    • ระบบการจัดการข้อมูลผ่านสเปรดชีต (BI)
    • เอกสาร
    • ระบบลงลายเซ็น
    การขาย
    • ลูกค้าสัมพันธ์
    • การขาย
    • POS ร้านค้า
    • POS ร้านอาหาร
    • ระบบสมัครสมาชิก
    • การเช่า
    การจัดการเว็บไซต์
    • เครื่องมือสร้างเว็บไซต์
    • ระบบการขายออนไลน์
    • บล็อก
    • ฟอรั่ม
    • ไลฟ์แชท
    • ระบบการอบรมออนไลน์
    ซัพพลายเชน
    • คลังสินค้า
    • ระบบการผลิต
    • PLM
    • ระบบการจัดซื้อ
    • การซ่อมบำรุง
    • ระบบจัดการคุณภาพ
    ทรัพยากรบุคคล
    • ข้อมูลพนักงาน
    • ระบบสรรหาบุคลากร
    • ระบบการลา
    • การประเมิน
    • ระบบการแนะนำพนักงาน
    • ระบบจัดการยานพาหนะ
    การตลาด
    • โซเชียลมาร์เก็ตติ้ง
    • การตลาดผ่านอีเมล
    • ระบบการตลาดผ่าน SMS
    • ระบบการจัดงานอีเวนต์
    • การตลาดแบบอัตโนมัติ
    • ระบบแบบสำรวจ
    การบริการ
    • โปรเจกต์
    • ระบบบันทึกเวลา
    • ระบบการจัดการบริการภาคสนาม
    • ระบบดูแลช่วยเหลือ
    • การวางแผน
    • การนัดหมาย
    ประสิทธิผล
    • ระบบแสดงความคิดเห็น
    • ระบบการอนุมัติ
    • ไอโอที
    • VoIP
    • คลังข้อมูล
    • WhatsApp
    แอปพลิเคชันของบุคคลที่สาม Odoo สตูดิโอ แพลตฟอร์มคลาวด์ของ Odoo
  • อุตสาหกรรม
    การค้าปลีก
    • ร้านขายหนังสือ
    • ร้านขายเสื้อผ้า
    • ร้านขายเฟอร์นิเจอร์
    • ร้านขายของชำ
    • ร้านขายฮาร์ดแวร์
    • ร้านขายของเล่น
    Food & Hospitality
    • บาร์และผับ
    • ร้านอาหาร
    • อาหารฟาสต์ฟู้ด
    • Guest House
    • ตัวแทนจำหน่ายเครื่องดื่ม
    • Hotel
    อสังหาริมทรัพย์
    • Real Estate Agency
    • บริษัทสถาปัตยกรรม
    • บริษัทรับเหมา
    • การจัดการอสังหาริมทรัพย์
    • การจัดสวน
    • สมาคมเจ้าของอสังหาริมทรัพย์
    ปรึกษา
    • สำนักงานบัญชี
    • Odoo พาร์ทเนอร์
    • เอเจนซี่การตลาด
    • สำนักงานกฎหมาย
    • บริการสรรหาบุคลากร
    • การตรวจสอบและการรับรอง
    ระบบการผลิต
    • Textile
    • เหล็ก
    • เฟอร์นิเจอร์
    • อาหาร
    • Brewery
    • ของขวัญขององค์กร
    สุขภาพ & ฟิตเนส
    • ชมรมกีฬา
    • ร้านขายแว่นตา
    • ฟิตเนส
    • ผู้ประกอบวิชาชีพด้านสุขภาพ
    • ร้านขายยา
    • ร้านทำผม
    Trades
    • ช่างซ่อม
    • ฮาร์ดแวร์และการสนับสนุนด้านไอที
    • ระบบพลังงานแสงอาทิตย์
    • ช่างทำรองเท้า
    • บริการทำความสะอาด
    • HVAC Services
    อื่น ๆ
    • Nonprofit Organization
    • สำนักงานสิ่งแวดล้อม
    • ร้านเช่าป้ายโฆษณา
    • การถ่ายภาพ
    • ร้านเช่าจักรยาน
    • ตัวแทนจำหน่ายซอฟต์แวร์
    Browse all Industries
  • คอมมูนิตี้
    ศึกษา
    • บทเรียน
    • เอกสารกำกับโปรแกรม
    • การรับรอง
    • การฝึกอบรม
    • บล็อก
    • พอดแคสต์
    เพิ่มศักยภาพให้กับการศึกษา
    • โปรแกรมการศึกษา
    • Scale Up! Business Game
    • เยี่ยมชม Odoo
    รับซอฟต์แวร์
    • ดาวน์โหลด
    • เปรียบเทียบรุ่น
    • เผยแพร่
    ทำงานร่วมกัน
    • Github
    • ฟอรั่ม
    • ระบบการจัดงานอีเวนต์
    • การแปล
    • ร่วมเป็นพาร์ทเนอร์
    • Services for Partners
    • ลงทะเบียนเพื่อสร้างบัญชีบริษัทของคุณ
    รับบริการ
    • ค้นหาพาร์ทเนอร์
    • ค้นหานักบัญชี
    • พบกับที่ปรึกษา
    • บริการติดตั้งระบบเพื่อใช้งาน
    • ข้อมูลอ้างอิงลูกค้า
    • การสนับสนุน
    • อัปเกรด
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    รับการสาธิต
  • ราคา
  • ช่วยเหลือ

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

  • ลูกค้าสัมพันธ์
  • e-Commerce
  • ระบบบัญชี
  • สินค้าคงคลัง
  • PoS
  • โปรเจกต์
  • MRP
All apps
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
subcontracting MRP equipment manufacturing BoM
เกี่ยวกับฟอรั่มนี้
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
subcontracting MRP equipment manufacturing BoM
เกี่ยวกับฟอรั่มนี้
  1. MRP
  2. ฟอรั่ม

AssertionError: precision_rounding must be positive, got 0.0

ติดตาม

รับการแจ้งเตือนเมื่อมีกิจกรรมในโพสต์นี้

คำถามนี้ถูกตั้งค่าสถานะ
mrpinventoryworkordersales.ordermultiwarehouse
1 ตอบกลับ
3966 มุมมอง
อวตาร
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
อวตาร
ละทิ้ง
Cruz

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

อวตาร
Gracious Joseph
คำตอบที่ดีที่สุด

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
อวตาร
ละทิ้ง
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!

สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
Real Cost Perpetual Inventory Value
mrp inventory
อวตาร
อวตาร
1
ก.ย. 25
5719
Stock cost price from MRP/BOM
mrp inventory
อวตาร
อวตาร
1
พ.ค. 22
2808
Product Access Denied แก้ไขแล้ว
mrp inventory
อวตาร
อวตาร
1
พ.ค. 22
5941
How to solve delay in validate transfer
mrp inventory
อวตาร
0
มี.ค. 22
3283
Odoo Server Error - You can not change the finished work order.
mrp workorder
อวตาร
อวตาร
อวตาร
2
ม.ค. 20
6504
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • Github
  • Runbot
  • การแปล
บริการ
  • โฮสติ้ง odoo.sh เซิร์ฟเวอร์
  • การสนับสนุน
  • อัปเกรด
  • การพัฒนาที่กำหนดเอง
  • การศึกษา
  • ค้นหานักบัญชี
  • ค้นหาพาร์ทเนอร์
  • ร่วมเป็นพาร์ทเนอร์
เกี่ยวกับเรา
  • บริษัทของเรา
  • ทรัพย์สินในรูปของเครื่องหมายการค้า
  • ติดต่อเรา
  • งาน
  • ระบบการจัดงานอีเวนต์
  • พอดแคสต์
  • บล็อก
  • ลูกค้า
  • กฎหมาย • ความเป็นส่วนตัว
  • ความปลอดภัย
الْعَرَبيّة 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 เป็นชุดแอปธุรกิจแบบเปิดที่ครอบคลุมทุกความต้องการของบริษัทของคุณ อาธิ CRM eCommerce ระบบบัญชี ระบบสินค้าคงคลัง ระบบการขายหน้าร้าน โปรเจกต์ และ อีกมากมาย

ความเหนือกว่าอันเป็นเอกลักษณ์ของ Odoo คือการใช้งานที่ง่ายดายและผสานการทำงานอย่างสมบูรณ์แบบในเวลาเดียวกัน

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