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

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

อวตาร
ละทิ้ง
ผู้เขียน
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.

คำตอบที่ดีที่สุด

Hi Owais,

Try the following code,

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


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
พ.ค. 16
4112
0
มี.ค. 15
3593
1
พ.ค. 25
885
2
พ.ย. 24
2094
Self hosting Odoo custom แก้ไขแล้ว
1
ส.ค. 24
1804