Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3738 Lượt xem

All, I hope someone can help me with this issue:

  • I would like to use calculated product cost prices, based on all costs in a bom
  • To do this, I installed product_cost_incl_bom module, which is meant for exactly this
    • Straight after installation, I get the following error: "_bom_explode() takes at least 6 arguments (5 given)"

I am on OE 6.1 using product_variant_multi and bom_variant_multi, although this I guess this in itself shouldn't cause issues.

Has anybody experienced this before?

Kind regards,

TTH

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,The Problem may casused by module bom_variant_multi, It Overloaded _bom_explode function.so when you install product_cost_incl_bom,it call the _bom_explode method,but it's parameter changed bom_variant_multi/bom_template.py: def _bom_explode(self, cr, uid, bom, factor, product_id, orig_product_id=False, properties=None, addthis=False, level=0): product_cost_incl_bom/product_cost_incl_bom.py: sub_products, routes = bom_obj._bom_explode(cursor, user, bom, factor=1, properties=bom_properties, addthis=False) mrp/mrp.py: def _bom_explode(self, cr, uid, bom, factor, properties=[], addthis=False, level=0, routing_id=False):

Hope it will help you

Kind regards,

Ảnh đại diện
Huỷ bỏ
Tác giả

Hi, first of all thanks for your reply! I checked the code, and tried the edits you suggested. Only product_cost_incl_bom.py was different. After changing the code and installing module product_cost_incl_bom, I still get the error: "sub_products, routes = bom_obj._bom_explode(cursor, user, bom, factor=1, properties=bom_properties, addthis=False) TypeError: _bom_explode() takes at least 6 non-keyword arguments (5 given)" Any other suggestions?