78. Active Id In Odoo Development || Odoo active_id || Get Data From Main Model inside Wizard Model

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • Working and use of active_id in odoo. Get data from main model inside wizard model. Usage of active_id in odoo development. Odoo 15 tutorial. Odoo 15 development videos. Working of active_id in Odoo. Odoo mates videos.
    Odoo 15 Playlist: • How To Configure Odoo1...
    Website: www.odoomates....
    Instgram: / odoomates
    Github: github.com/odo...
    Email : odoomates@gmail.com
    Facebook: / odoomate
    Twitter: / odoomates
    Support Us in Ko Fi : ko-fi.com/odoo...

Комментарии • 23

  • @SamirSELLAMI
    @SamirSELLAMI 2 года назад +2

    Hi, I have two questions please:
    - How can we load the values of other fields (ex. "date") of the main model active record other then the "id" ?
    - How to save back changes done in wizard fields record into the main model record ?

    • @OdooMates
      @OdooMates  2 года назад +2

      From the default_get method, we can get main record, by browsing the active_id and then we can access any value from the main model

    • @OdooMates
      @OdooMates  2 года назад +3

      To save back value to original model,
      main_rec = self.env['main_model'].browse(active_id)
      main_rec.field = new_value

    • @SamirSELLAMI
      @SamirSELLAMI 2 года назад

      @@OdooMates I tried:
      res[‘field_name’] = self.env.context.get(‘active_id.field_name’) but it return context none.

    • @SamirSELLAMI
      @SamirSELLAMI 2 года назад +1

      @@OdooMates U mean I should use the “Browse” method instead of “Get” ?

    • @OdooMates
      @OdooMates  2 года назад +1

      @@SamirSELLAMI we have to browse the record by getting the active_id from context

  • @wildbeauty9257
    @wildbeauty9257 2 года назад

    Thanks 👍👍👍

  • @ShadHastam
    @ShadHastam 7 месяцев назад

    Thanks

  • @altelasoftware2992
    @altelasoftware2992 Год назад

    good video, do you have tutorial regarding passing one2many fields record from models.Model to transientModel?

  • @MuhammadUmarAkram4
    @MuhammadUmarAkram4 2 года назад +1

    Can we upload documents to attachments via wizard?

  • @sarathisarathi318
    @sarathisarathi318 Год назад

    how to acess many2many field in wizard .it shows not allowed to access error

  • @melvinguerra9563
    @melvinguerra9563 2 года назад

    how to point to specific active_id in active_ids?

    • @OdooMates
      @OdooMates  2 года назад

      active_ids is list, lets say, it is [4,3,2,1]
      from this list on what basis you need to get a specific one ?

    • @melvinguerra9563
      @melvinguerra9563 2 года назад

      @@OdooMates if you use browse method it would retrieve a list?