콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
im trying to add a product in purchase order receipt based on a selection field in the purchase order using an automated action but keep getting this error:
Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 641, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/src/odoo/odoo/http.py", line 317, in _handle_exception
    raise exception.with_traceback(None) from new_cause

Here is my code from the automated action for reference :


transfer = env['stock.picking'].search([( 'origin' , '=' , str(record.name) )])
stock_move = env['stock.move'].search([( 'picking_id' , '=' , int(transfer.id) )])
if(record.x_studio_purchase_type == "Raw"):
waste_product = env['product.product'].search([( 'name' , '=' , str("Waste") )])
stock_move.move_line_ids.create({'product_id': waste_product.id, 'product_uom_qty': 0 , 'product_uom_id': 3})


아바타
취소
관련 게시물 답글 화면 활동
1
8월 24
2841
1
3월 23
9397
0
3월 22
2695
3
7월 24
8168
2
5월 24
2307