Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2300 มุมมอง

I'm trying to do the following in odoo16:
Multi Warehouse for Sales Order

User can select multiple warehouse for sale orders


Change Warehouse on Sale Order

User can change or select different warehouse for sale order line.


Delivery Order Based on Warehouse

Delivery order will created based on warehouse selected on sales order line sales order line.
I created this class :

from odoo import models , fields,api,_
class sale_order(models.Model):
_name='sale.order'
_inherit = 'sale.order'
warehouse_id=fields.Many2one("stock.warehouse")

Is this code true?
and how can i do the rest?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi, 

If you need to add Warehouses on the sale order line, instead of an inheriting sale. order. Inherit the sale order line and add the warehouse_id field and create different picking for each warehouse.

class SaleOrderLine(models.Model):
_inherit = 'sale.order.line'

warehouses_id = fields.Many2one('stock.warehouse',string="Warehouse")

Regards

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 18
8895
6
มี.ค. 15
19171
2
ก.ค. 25
1580
1
พ.ค. 25
6808
Sales Order From Excel Sheets แก้ไขแล้ว
1
พ.ย. 24
2233