Skip to Content
Menu
This question has been flagged
1 Reply
1253 Views

classSaleTransportOrder(models.Model):

         _inherit = 'sale.order'

          transport_id = fields.Many2one('transport.management', string="Transport Via")
         defaction_confirm(self):

         ressuper(SaleTransportOrder,  self).action_confirm()

          for rec in self:

        rec.picking_ids.write({'transport_id':rec.transport_id.id})

       returnres


classStockpicking(models.Model):

        _inherit = "stock.picking"

          transport_id=fields.Many2one("transport.management",string="TransportVia",tracking=True,readonly=True)

route_id = fields.Many2one("transport.routes", string="Route",tracking=True,)


i wont to add domain fields transport_id to route_id

Avatar
Discard
Author
yes


On Thu, Jan 5, 2023 at 10:57 AM Emad akram <notifications@mail.odoo.com> wrote:

A new question how to use domain defferent fields of object in odoo v14 , blow my code... on Help has been posted. Click here to access the question :

See question

Sent by Odoo S.A. using Odoo.

Best Answer

Hi Owais,

Try the following code,

    @api.onchange('transport_id')
    def onchange_transport_id(self):
        res = {
            'domain': {
                'route_id': [(Your Domain Here)]
            }}
        return res


Avatar
Discard
Related Posts Replies Views Activity
2
May 16
3172
0
Mar 15
2903
2
Nov 24
475
1
Aug 24
295
4
Feb 24
10159