Bỏ qua để đến Nội dung
Odoo Menu
  • Đăng nhập
  • Dùng thử miễn phí
  • Ứng dụng
    Tài chính
    • Kế toán
    • Hóa đơn
    • Chi phí
    • Bảng tính (BI)
    • Tài liệu
    • Ký tên
    Bán hàng
    • CRM
    • Bán hàng
    • POS Cửa hàng
    • POS Nhà hàng
    • Đăng ký
    • Cho thuê
    Trang web
    • Trình tạo trang web
    • Thương mại điện tử
    • Blog
    • Diễn đàn
    • Trò chuyện trực tiếp
    • Học trực tuyến
    Chuỗi cung ứng
    • Tồn kho
    • Sản xuất
    • PLM
    • Mua hàng
    • Bảo dưỡng
    • Chất lượng
    Nhân sự
    • Nhân viên
    • Tuyển dụng
    • Ngày nghỉ
    • Đánh giá
    • Giới thiệu
    • Đội xe
    Marketing
    • Marketing trên MXH
    • Marketing qua email
    • Marketing qua SMS
    • Sự kiện
    • Tự động hóa Marketing
    • Khảo sát
    Dịch vụ
    • Dự án
    • Bảng chấm công
    • Dịch vụ hiện trường
    • Hỗ trợ
    • Kế hoạch
    • Lịch hẹn
    Năng suất
    • Thảo luận
    • Phê duyệt
    • IoT
    • VoIP
    • Kiến thức
    • WhatsApp
    Ứng dụng của bên thứ ba Studio Odoo Nền tảng Đám mây Odoo
  • Ngành
    Bán lẻ
    • Nhà sách
    • Cửa hàng quần áo
    • Cửa hàng nội thất
    • Cửa hàng tạp hóa
    • Cửa hàng đồ kim khí
    • Cửa hàng đồ chơi
    Ẩm thực & Dịch vụ lưu trú
    • Bar và quán rượu
    • Nhà hàng
    • Đồ ăn nhanh
    • Guest house
    • Nhà phân phối đồ uống
    • Khách sạn
    Bất động sản
    • Công ty môi giới bất động sản
    • Công ty kiến trúc
    • Xây dựng
    • Quản lý bất động sản
    • Làm vườn
    • Hiệp hội chủ sở hữu bất động sản
    Tư vấn
    • Công ty kế toán
    • Đối tác Odoo
    • Công ty marketing
    • Công ty luật
    • Tuyển dụng
    • Thanh tra & chứng nhận
    Sản xuất
    • Dệt may
    • Kim loại
    • Nội thất
    • Ẩm thực
    • Nhà máy bia
    • Quà tặng doanh nghiệp
    Sức khoẻ & fitness
    • CLB thể thao
    • Cửa hàng kính mắt
    • Trung tâm fitness
    • Chuyên gia chăm sóc sức khỏe
    • Hiệu thuốc
    • Tiệm làm tóc
    Thương mại
    • Dịch vụ sửa chữa
    • Phần cứng CNTT & Hỗ trợ
    • Hệ thống năng lượng mặt trời
    • Công ty sản xuất giày
    • Dịch vụ vệ sinh
    • Dịch vụ HVAC
    Khác
    • Tổ chức phi lợi nhuận
    • Cơ quan môi trường
    • Cho thuê biển quảng cáo
    • Nhiếp ảnh
    • Cho thuê xe đạp
    • Đại lý phần mềm
    Xem tất cả ngành
  • Cộng đồng
    Học tập
    • Khóa học
    • Tài liệu
    • Chứng chỉ
    • Đào tạo
    • Blog
    • Podcast
    Thúc đẩy đào tạo
    • Chương trình đào tạo
    • Trò chơi kinh doanh Scale Up!
    • Tham quan Odoo
    Nhận phần mềm
    • Tải xuống
    • So sánh các phiên bản
    • Phiên bản
    Hợp tác
    • Github
    • Diễn đàn
    • Sự kiện
    • Dịch thuật
    • Trở thành đối tác
    • Dịch vụ dành cho Đối tác
    • Đăng ký công ty kế toán của bạn
    Nhận dịch vụ
    • Tìm đối tác
    • Tìm kế toán
    • Gặp chuyên gia hỗ trợ
    • Dịch vụ Triển khai
    • Khách hàng tham khảo
    • Hỗ trợ
    • Nâng cấp
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Nhận một buổi demo
  • Bảng giá
  • Trợ giúp

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

  • CRM
  • e-Commerce
  • Kế toán
  • Tồn kho
  • PoS
  • Dự án
  • MRP
All apps
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Bạn cần phải đăng ký để tương tác với cộng đồng.
Tất cả bài viết Người Huy hiệu
Thẻ (Xem tất cả)
odoo accounting v14 pos v15
Về diễn đàn này
Hỗ trợ

How to create manufacturing order using API?

Đăng ký nhận tin

Nhận thông báo khi có hoạt động trên bài viết này

Câu hỏi này đã bị gắn cờ
apibomManufacturing Order
2 Trả lời
11006 Lượt xem
Ảnh đại diện
Ruben Agadzanjans

I'm trying to create a manufacturing order using API. I can create a new order, but it doesn't have any components. The bom I'm using has components defined, by they are not populated when this manufacturing order is created.

Here is how I'm creating it: 

models.execute_kw(db, uid, password, 
'mrp.production', 'create', [{
  product_id: 69,
  bom_id: 9,
  product_uom_id: 1,
}]
)
Thanks!
0
Ảnh đại diện
Huỷ bỏ
Cody Kinzett

Hey there, did you work this out? I am facing the same issue. I can create the MO but cannot proceed as it has no components, I believe the stock.move has something to do with it. as this line is in mrp_production.py

move_raw_ids = fields.One2many(

'stock.move', 'raw_material_production_id', 'Components',

copy=True, states={'done': [('readonly', True)], 'cancel': [('readonly', True)]},

domain=[('scrapped', '=', False)])

Ruben Agadzanjans
Tác giả

I ended up using python to create manufacturing order.

Here is what I do:

```

bom_description = self.get_bom_description(product_id)

manufacturing_order = self.env['mrp.production'].create([{

'product_id': product_id,

'product_qty': 1,

'product_uom_qty': 1,

'qty_produced': 1,

'product_uom_id': bom_description['product_uom_id'][0],

'bom_id': bom_description['bom_id'][0],

'origin': origin,

'move_finished_ids': [

[0, '', {

'product_id': move_finished_id[2]['product_id'][0],

'product_uom': move_finished_id[2]['product_uom'][0],

'product_uom_qty': move_finished_id[2]['product_uom_qty'],

'location_id': move_finished_id[2]['location_id'][0],

'location_dest_id': destination_location.id,

'name': move_finished_id[2]['name'],

'byproduct_id': False,

}]

for move_finished_id in bom_description['move_finished_ids'][1:]

],

'move_raw_ids': [

[0, '', {

'product_id': move_raw_id[2]['product_id'][0],

'bom_line_id': move_raw_id[2]['bom_line_id'][0],

'product_uom': move_raw_id[2]['product_uom'][0],

'product_uom_qty': move_raw_id[2]['product_uom_qty'],

'location_id': part_source_location.id,

'location_dest_id': move_raw_id[2]['location_dest_id'][0],

'name': move_raw_id[2]['name'],

}]

for move_raw_id in bom_description['move_raw_ids'][1:]

]

}])

manufacturing_order.action_confirm()

manufacturing_order.update({'lot_producing_id': lot.id})

immediate_production = self.env['mrp.immediate.production'].create({

'immediate_production_line_ids': [[0, '', {

'production_id': manufacturing_order.id,

'to_immediate': True

}]]

})

immediate_production.process()

manufacturing_order.button_mark_done()

def get_bom_description(self, product_id):

onchange_res = self.env['mrp.production'].onchange(

{

'product_id': product_id,

},

'product_id',

{

'company_id': '1',

'product_id': '1',

'product_qty': '1',

'product_uom_id': '1',

'bom_id': '1',

'move_finished_ids': '1',

'move_finished_ids.product_id': '1',

'move_finished_ids.product_uom': '1',

'move_finished_ids.product_uom_qty': '1',

'move_finished_ids.location_id': '1',

'move_finished_ids.location_dest_id': '1',

'move_finished_ids.name': '',

'move_raw_ids': '1',

'move_raw_ids.product_id': '1',

'move_raw_ids.name': '',

'move_raw_ids.bom_line_id': '',

'move_raw_ids.location_id': '1',

'move_raw_ids.location_dest_id': '1',

'move_raw_ids.product_uom_qty': '1',

'move_raw_ids.product_uom': '1',

}

)

return onchange_res['value']

```

Same thing can be done using API. The important part for me was that I needed to call [mrp.production].onchange to get information about all components from the bom and then pass them in as move_finished_ids and move_raw_ids.

Ảnh đại diện
Ruben Agadzanjans
Tác giả Câu trả lời hay nhất

I ended up using python to create manufacturing order.

Here is what I do:

    def assemble_product(self, product_id, part_source_location, destination_location, origin=None):
bom_description = self.get_bom_description(product_id)
manufacturing_order = self.env['mrp.production'].create([{
'product_id': product_id,
'product_qty': 1,
'product_uom_qty': 1,
'qty_produced': 1,
'product_uom_id': bom_description['product_uom_id'][0],
'bom_id': bom_description['bom_id'][0],
'origin': origin,
'move_finished_ids': [
[0, '', {
'product_id': move_finished_id[2]['product_id'][0],
'product_uom': move_finished_id[2]['product_uom'][0],
'product_uom_qty': move_finished_id[2]['product_uom_qty'],
'location_id': move_finished_id[2]['location_id'][0],
'location_dest_id': destination_location.id,
'name': move_finished_id[2]['name'],
'byproduct_id': False,
}]
for move_finished_id in bom_description['move_finished_ids'][1:]
],
'move_raw_ids': [
[0, '', {
'product_id': move_raw_id[2]['product_id'][0],
'bom_line_id': move_raw_id[2]['bom_line_id'][0],
'product_uom': move_raw_id[2]['product_uom'][0],
'product_uom_qty': move_raw_id[2]['product_uom_qty'],
'location_id': part_source_location.id,
'location_dest_id': move_raw_id[2]['location_dest_id'][0],
'name': move_raw_id[2]['name'],
}]
for move_raw_id in bom_description['move_raw_ids'][1:]
]
}])
manufacturing_order.action_confirm()
immediate_production = self.env['mrp.immediate.production'].create({
'immediate_production_line_ids': [[0, '', {
'production_id': manufacturing_order.id,
'to_immediate': True
}]]
})
immediate_production.process()
manufacturing_order.button_mark_done()

def get_bom_description(self, product_id):
onchange_res = self.env['mrp.production'].onchange(
{
'product_id': product_id,
},
'product_id',
{
'company_id': '1',
'product_id': '1',
'product_qty': '1',
'product_uom_id': '1',
'bom_id': '1',
'move_finished_ids': '1',
'move_finished_ids.product_id': '1',
'move_finished_ids.product_uom': '1',
'move_finished_ids.product_uom_qty': '1',
'move_finished_ids.location_id': '1',
'move_finished_ids.location_dest_id': '1',
'move_finished_ids.name': '',
'move_raw_ids': '1',
'move_raw_ids.product_id': '1',
'move_raw_ids.name': '',
'move_raw_ids.bom_line_id': '',
'move_raw_ids.location_id': '1',
'move_raw_ids.location_dest_id': '1',
'move_raw_ids.product_uom_qty': '1',
'move_raw_ids.product_uom': '1',
}
)
return onchange_res['value']

def assemble_product_with_serial_number(self, product_id, serial_number, part_source_location, destination_location, origin=None):
if not serial_number:
raise UserError('non-empty serial_number must be provided')

_logger.info(f'Assembling: {serial_number}')

lot_name = serial_number
existing_lot = self.env['stock.production.lot'].search([('name', '=', lot_name)], limit=1)
if existing_lot and existing_lot.product_qty > 0:
raise UserError(f'Device with serial number {lot_name} already exists')

lot = existing_lot or self.env['stock.production.lot'].create({
'product_id': product_id,
'name': lot_name,
'company_id': self.env.company.id
})

bom_description = self.get_bom_description(product_id)
manufacturing_order = self.env['mrp.production'].create([{
'product_id': product_id,
'product_qty': 1,
'product_uom_qty': 1,
'qty_produced': 1,
'product_uom_id': bom_description['product_uom_id'][0],
'bom_id': bom_description['bom_id'][0],
'origin': origin,
'move_finished_ids': [
[0, '', {
'product_id': move_finished_id[2]['product_id'][0],
'product_uom': move_finished_id[2]['product_uom'][0],
'product_uom_qty': move_finished_id[2]['product_uom_qty'],
'location_id': move_finished_id[2]['location_id'][0],
'location_dest_id': destination_location.id,
'name': move_finished_id[2]['name'],
'byproduct_id': False,
}]
for move_finished_id in bom_description['move_finished_ids'][1:]
],
'move_raw_ids': [
[0, '', {
'product_id': move_raw_id[2]['product_id'][0],
'bom_line_id': move_raw_id[2]['bom_line_id'][0],
'product_uom': move_raw_id[2]['product_uom'][0],
'product_uom_qty': move_raw_id[2]['product_uom_qty'],
'location_id': part_source_location.id,
'location_dest_id': move_raw_id[2]['location_dest_id'][0],
'name': move_raw_id[2]['name'],
}]
for move_raw_id in bom_description['move_raw_ids'][1:]
]
}])
manufacturing_order.action_confirm()
manufacturing_order.update({'lot_producing_id': lot.id})
immediate_production = self.env['mrp.immediate.production'].create({
'immediate_production_line_ids': [[0, '', {
'production_id': manufacturing_order.id,
'to_immediate': True
}]]
})
immediate_production.process()
manufacturing_order.button_mark_done()
_logger.info(f'Completed Manufacturing Order {manufacturing_order.name}')

return self.env['stock.production.lot'].browse(lot.id)



Same thing can be done using API. The important part for me was that I needed to call [mrp.production].onchange to get information about all components from the bom and then pass them in as move_finished_ids and move_raw_ids.

(edit: added example for assembling a product with serial number)
1
Ảnh đại diện
Huỷ bỏ
Cody Kinzett

Awesome thank you for the script! this works as needed, i don't think i would have ever worked this out! I would mark your answer as the correct answer as i'm sure people will look for this in the future!

Ray Carnes (ray)

A way to get access to the "secret" API calls you need is explained https://www.odoo.com/forum/help-1/how-can-i-see-which-api-calls-are-made-to-learn-what-odoo-is-doing-at-specific-times-183911

Cody Kinzett

Another quick question if you have any suggestions, it works great for products that dont need a Serial/Lot ID but gives me an error for products that do need a lot.

i can generate a randomised serial using the commented code, manufacturing_order.action_generate_serial()

but id really like to use the Lot_id provided by the user to create the lot.

ive tried passing 'lot_producing_id' and it actually appears in the produced MO's but i must be missing a variable or prior function because the MO's cannot be advanced to 'Done' even if you change to a different/create a new Serial on the Manufacturing order direclty. it always says user Error a lot/serial number must be supplied.

ive also tried passing 'Lot_Ids' ,'order_finished_lot_ids' on the 'move_finished_ids' variable but this doesnt help or progress it in any way...

wondering if i pass a var in the XML. as i have seen some Xpath solutions.

Code is :::

Lot_id = self.env['stock.production.lot'].create({

'name': self.Serial_Number,

'product_id': WIP_check,

'company_id': company,

})

## https://www.odoo.com/forum/help-1/how-to-create-manufacturing-order-using-api-182874

bom_description = self.get_bom_description(WIP_check)

print('str(self.package_qty)',str(self.package_qty))

manufacturing_order = self.env['mrp.production'].create([{

'product_id': WIP_check,

'product_qty': str(self.package_qty),

'product_uom_id': bom_description['product_uom_id'][0],

'qty_producing': self.package_qty,

'product_uom_qty': str(self.package_qty),

'bom_id': bom_description['bom_id'][0],

'origin': self.reference,

'location_src_id': Source_Location,

'lot_producing_id': Lot_id.id,

'move_finished_ids': [

[0, '', {

'product_id': move_finished_id[2]['product_id'][0],

'product_uom': move_finished_id[2]['product_uom'][0],

'product_uom_qty': str(int(move_finished_id[2]['product_uom_qty'])*int(self.package_qty)),

'location_id': move_finished_id[2]['location_id'][0],

'location_dest_id': move_finished_id[2]['location_dest_id'][0],

'name': move_finished_id[2]['name'],

'byproduct_id': False,

'quantity_done': str(int(move_finished_id[2]['product_uom_qty']) * int(self.package_qty)),

}]

for move_finished_id in bom_description['move_finished_ids'][1:]

],

'move_raw_ids': [ [0, '', {

'product_id': move_raw_id[2]['product_id'][0],

'bom_line_id': move_raw_id[2]['bom_line_id'][0],

'product_uom': move_raw_id[2]['product_uom'][0],

'product_uom_qty': str(int(move_raw_id[2]['product_uom_qty'])*int(self.package_qty)),

'location_id': Source_Location,

'location_dest_id':Source_Location,

'name': move_raw_id[2]['name'],

'quantity_done': str(int(move_raw_id[2]['product_uom_qty']) * int(self.package_qty)),

}]

for move_raw_id in bom_description['move_raw_ids'][1:]

]

}])

manufacturing_order.action_confirm()

# manufacturing_order.action_generate_serial()

manufacturing_order.action_assign()

manufacturing_order.button_mark_done()

def get_bom_description(self, product_id):

onchange_res = self.env['mrp.production'].onchange(

{

'product_id': product_id

},

'product_id',

{

'company_id': '1',

'product_id': '1',

'product_qty': '1',

'product_uom_id': '1',

'bom_id': '1',

'move_finished_ids': '1',

'move_finished_ids.product_id': '1',

'move_finished_ids.product_uom': '1',

'move_finished_ids.product_uom_qty': '1',

'move_finished_ids.location_id': '1',

'move_finished_ids.location_dest_id': '1',

'move_finished_ids.name': '',

'move_raw_ids': '1',

'move_raw_ids.product_id': '1',

'move_raw_ids.name': '',

'move_raw_ids.bom_line_id': '',

'move_raw_ids.location_id': '1',

'move_raw_ids.location_dest_id': '1',

'move_raw_ids.product_uom_qty': '1',

'move_raw_ids.product_uom': '1',

}

)

return onchange_res['value']

Cody Kinzett

also @ray i setup this and it is helpful, but when i compare my code running to odoo code manufacturing i see the same thing.

working MO : 'lot_producing_id': (185, '0000011'),

my test : 'lot_producing_id': (195, '207'),

when I look at PGadmin i can see the lot_producing_id in the correct table.

select * from mrp_production mp

inner join

stock_production_lot spl

on

mp.lot_producing_id = spl.id;

my lack of odoo understanding and where to find solutions is the issue hahahah.

im not sure which triggers run when Odoo runs its own MO because from what i can tell im doing the right things.

Ive found a ton of your answers for automating stuff using auto assigned Lots but unfortunately not much for user assigned lots.

Hoping your expertise will come in handy here

Ruben Agadzanjans
Tác giả

I've edited the answer to add another example for manufacturing a product with a serial number

Cody Kinzett

Thank you Ruben very professional! I hope to be as skilled as you someday! any advice on how to learn to reverse engineer Odoo so I can learn how to do this myself?

Ruben Agadzanjans
Tác giả

It took me around three months to figure this out and to implement odoo in our organization. Basically I had to read a lot of the source code to understand how it works (e.g. https://github.com/odoo/odoo/tree/14.0/addons/mrp/models). I also inspect what calls are made by the odoo UI and that gives me an idea of where to look at.

Cody Kinzett

A little extra. this code will consume products where lot assignment is turned on for consumed goods. thanks to Ray and Ruben for the advice that got me there.

def assemble_product_with_serial_number(self):

lot_name = self.Serial_Number

existing_lot = self.env['stock.production.lot'].search([('name', '=', lot_name)], limit=1)

if existing_lot and existing_lot.product_qty > 0:

raise exceptions.UserError(f'Device with serial number {lot_name} already exists')

lot = existing_lot or self.env['stock.production.lot'].create({

'product_id': WIP_check,

'name': lot_name,

'company_id': self.env.company.id

})

bom_description = self.get_bom_description(WIP_check)

for move_finished_id in bom_description['move_finished_ids']:

print(move_finished_id)

manufacturing_order = self.env['mrp.production'].create([{

'product_id': WIP_check,

'product_qty': str(self.package_qty),

'product_uom_qty': 1,

'product_uom_id': bom_description['product_uom_id'][0],

'bom_id': bom_description['bom_id'][0],

'origin': self.reference,

'location_src_id': Source_Location,

'move_finished_ids': [

[0, '', {

'product_id': move_finished_id[2]['product_id'][0],

'product_uom': move_finished_id[2]['product_uom'][0],

'product_uom_qty': str(int(move_finished_id[2]['product_uom_qty'])*int(self.package_qty)),

'location_id': move_finished_id[2]['location_id'][0],

'location_dest_id': Source_Location,

'name': move_finished_id[2]['name'],

'byproduct_id': False,

}]

for move_finished_id in bom_description['move_finished_ids'][1:]

],

'move_raw_ids': [

[0, '', {

'product_id': move_raw_id[2]['product_id'][0],

'bom_line_id': move_raw_id[2]['bom_line_id'][0],

'product_uom': move_raw_id[2]['product_uom'][0],

'product_uom_qty': str(int(move_raw_id[2]['product_uom_qty'])*int(self.package_qty)),

'location_id': Source_Location,

'location_dest_id': move_raw_id[2]['location_dest_id'][0],

'name': move_raw_id[2]['name'],

}]

for move_raw_id in bom_description['move_raw_ids'][1:]

]

}])

manufacturing_order.action_confirm()

# get actual lot ID's in WIP, - how to handle half lots?

# get actual consumption value - DONE

tracking=[]

for raw_ids in bom_description['move_raw_ids'][1:]:

if raw_ids[2]['has_tracking'] != 'none':

sm = self.env['stock.move'].search([('reference', '=', manufacturing_order.name),('product_id','=',raw_ids[2]['product_id'][0])])

self._cr.execute("""

select

lot_id,

sq.quantity,

reserved_quantity,

sl.complete_name

from

stock_quant sq

inner join

stock_location sl

on

sq.location_id = sl.id

inner join

stock_move sm

on

sl.id = sm.location_id

and

sq.product_id = sm.product_id

where

sl.complete_name like %s

and

sm.id = %s

and

lot_id is not null

""",

('%WIP%',sm.id))

Lots_Avail_in_WIP = self._cr.fetchall()

product_to_consume = int(self.package_qty)

for lot_id, sq_quantity, reserved_quantity, sl_complete_name in Lots_Avail_in_WIP:

print('--', lot_id, sq_quantity, reserved_quantity, sl_complete_name)

print('--int(raw_ids[2][product_uom_qty]) * product_to_consume',int(raw_ids[2]['product_uom_qty']) * product_to_consume)

if sq_quantity < 1:

continue

elif sq_quantity > int(raw_ids[2]['product_uom_qty']) * product_to_consume:

print('---Enough goods for single lot consumption')

self.env['stock.move'].search([('id', '=', sm.id)]).update({'lot_ids': [lot_id],

'product_uom_qty': str(int(raw_ids[2]['product_uom_qty'])*product_to_consume),

'quantity_done': str(int(raw_ids[2]['product_uom_qty'])*product_to_consume),

'should_consume_qty': str(int(raw_ids[2]['product_uom_qty'])*product_to_consume),

})

break

else:

#to be completed

print('---not enough goods for single lot consumption')

self.env['stock.move'].search([('id', '=', sm.id)]).update({'lot_ids': [lot_id],

'product_uom_qty': str(int(

raw_ids[2][

'product_uom_qty']) * product_to_consume),

'quantity_done': str(int(raw_ids[2][

'product_uom_qty']) * product_to_consume),

'should_consume_qty': str(int(

raw_ids[2][

'product_uom_qty']) * product_to_consume),

})

product_to_consume -= sq_quantity

manufacturing_order.update({'lot_producing_id': lot.id})

immediate_production = self.env['mrp.immediate.production'].create({

'immediate_production_line_ids': [[0, '', {

'production_id': manufacturing_order.id,

'to_immediate': True

}]]

})

immediate_production.process()

manufacturing_order.button_mark_done()

_logger.info(f'Completed Manufacturing Order {manufacturing_order.name}')

Ảnh đại diện
Andrei Dobrescu
Câu trả lời hay nhất

Hello,

The easisest way I could find is to trigger these methods:

  record._onchange_move_raw()

  record._onchange_move_finished_product()

  record._onchange_workorder_ids()

It should deliver everything needed for the BoM.


Cheers,

Andrei

0
Ảnh đại diện
Huỷ bỏ
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!

Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!

Đăng ký
Bài viết liên quan Trả lời Lượt xem Hoạt động
Single MO Creates 3 Products 13.0 Đã xử lý
bom Manufacturing Order
Ảnh đại diện
2
thg 1 20
3392
How to know when to order inventory to fulfil Manufacturing Orders? Đã xử lý
bom Manufacturing Order
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
Ảnh đại diện
6
thg 10 18
6667
Show SO availability from BoM components for Make-To-Order repairs (need MO)
bom Manufacturing Order sales order
Ảnh đại diện
Ảnh đại diện
1
thg 10 25
482
Start manufacturing with available components
bom subprocess Manufacturing Order
Ảnh đại diện
0
thg 3 23
2518
Produce multiple items from one manufacturing order
manufacturing bom Manufacturing Order
Ảnh đại diện
Ảnh đại diện
1
thg 5 22
6233
Cộng đồng
  • Khóa học
  • Tài liệu
  • Diễn đàn
Open source
  • Tải xuống
  • Github
  • Runbot
  • Dịch thuật
Dịch vụ
  • Lưu trữ Odoo.sh
  • Hỗ trợ
  • Nâng cấp
  • Phát triển tùy chỉnh
  • Đào tạo
  • Tìm kế toán
  • Tìm đối tác
  • Trở thành đối tác
Giới thiệu công ty
  • Công ty của chúng tôi
  • Tài sản thương hiệu
  • Liên hệ
  • Việc làm
  • Sự kiện
  • Podcast
  • Blog
  • Khách hàng
  • Pháp lý • Riêng tư
  • Bảo mật
الْعَرَبيّة 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 là bộ ứng dụng kinh doanh có open source đáp ứng tất cả các nhu cầu của công ty bạn: CRM, thương mại điện tử, kế toán, tồn kho, POS, quản lý dự án, v.v.

Định hướng giá trị riêng biệt của Odoo là tích hợp hoàn toàn và dễ dàng sử dụng.

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