Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
2225 Visualizações

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
Cancelar
Autor
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.

Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
mai. 16
4110
0
mar. 15
3592
1
mai. 25
882
2
nov. 24
2093
1
ago. 24
1797