class SaleTransportOrder(models.Model):
_inherit = 'sale.order'
transport_id = fields.Many2one('transport.management', string="Transport Via", required=True)
def action_confirm(self):
rec = super(SaleTransportOrder, self).action_confirm()
i = self.env['stock.picking'].create({'transport_id':self.transport_id.id, })
returnrec
class Stockpicking(models.Model):
_inherit = "stock.picking"
transport_id = fields.Many2one("transport.management",string="Transport Via",tracking=True,required=True , readonly=True)