콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
5342 화면
I add multiple PRODUCTS in the order lines of the REPAIR-ORDER, the price of each product shows up - but the untaxed sub total and total display (0) instead of the total of all products.

[![TOTAL AMOUNT][1]][1]

[![UNTAXED AMOUNT][2]][2]


아바타
취소
작성자 베스트 답변

I found that without the code below (this code causes MRP_REPAIR to add order lines both to the REPAIR ORDER and SALES ORDER), adding a product with a price doesnt get calculated in total field, and shows zero (0)

            
elif this.repair_sale_order_line_id:
                sale_obj = self.pool.get('sale.order')
                so_vals = {
                    'partner_id' : this.repair_sale_order_line_id.partner_id.id,
                    'fleet_id': this.repair_sale_order_line_id.fleet_id.id,
                    'responsable_id': uid,
                }
                created_so_id = so_obj.create(cr, uid, so_vals, context=context)
                sol_vals = {'order_id': created_so_id,
                           'price_unit': this.price_unit,
                           'product_uom_qty': this.product_uom_qty,
                           'price_subtotal': this.price_subtotal,
                           'discount': this.discount,
                           'product_id': this.product_id.id,
                           'tax_id': [(6, 0, [x.id for x
                                                     in this.tax_id])],
                           'name': this.name,
                           }
                self.pool.get('mrp.repair').write(cr, uid, this.repair_sale_order_line_id.id, {'sale_id':created_so_id},context=context)
                sol_id = sol_obj.create_sol(cr, uid, sol_vals, context)
                super(repair_sale_order_line, self).write(cr, uid, [res],{'sale_order_line_id':sol_id})

it seems that the Sale Order lines are used instead of the internal Repair Sale Order lines. The question is: how can i make the mrp not depend on the SO or its ORDER LINES.?

아바타
취소
관련 게시물 답글 화면 활동
0
5월 21
5650
2
5월 21
4540
0
10월 21
2744
0
3월 25
1420
0
1월 25
3498