تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2250 أدوات العرض

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يناير 18
8818
6
مارس 15
19139
2
يوليو 25
1470
1
مايو 25
6706
1
نوفمبر 24
2146