Relation Between Odoo Models: Create One2Many Field | Datatype In Odoo | Odoo Fields Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ม.ค. 2025

ความคิดเห็น • 40

  • @Weblearns
    @Weblearns  4 ปีที่แล้ว +4

    Dear All,
    Just for your information simple mistake found in this video is school_list field created in school.profile model actual name is student_list, by mistake wrote as school_list.
    Thank You

    • @ramzykaram296
      @ramzykaram296 4 ปีที่แล้ว +1

      Yeah, it got me confused so i had to restart watching the list from beginning.

    • @Weblearns
      @Weblearns  4 ปีที่แล้ว

      @@ramzykaram296 Sorry for the inconvenience

    • @Weblearns
      @Weblearns  3 ปีที่แล้ว

      For more discussion about supported Odoo fields (Datatype), Please check below playlist
      th-cam.com/play/PLAR8TpPnVeTT0eN9Yq2Y45r8B8Olr3MJ1.html
      DonateUS :-
      ko-fi.com/weblearns
      paypal.me/weblearners
      For business inquiry :- inquiryweblearns@gmail.com
      Source Code :- github.com/er-harsh-dhaduk/odoo-training
      Subscribe - Share - Comment/Suggestion - Enjoy - DonateUS

    • @TheodorusEricSetiadi
      @TheodorusEricSetiadi 3 ปีที่แล้ว

      Thank you for the correction.

  • @ramzykaram296
    @ramzykaram296 4 ปีที่แล้ว

    I am glad you solved the primary key and foreign key issue from the Many2One slide

  • @takeasmile4279
    @takeasmile4279 4 ปีที่แล้ว +1

    Very nice
    Continue

    • @Weblearns
      @Weblearns  4 ปีที่แล้ว +1

      Thank you :)

  • @joshuadamilare2936
    @joshuadamilare2936 4 ปีที่แล้ว +1

    Thanks for this video i am trying to fetch data from multiple models at once in odoo and use the field name for my pivot view please how can i do this

    • @Weblearns
      @Weblearns  4 ปีที่แล้ว +2

      Hi Joshua,
      Please check below official documentation for create PIVOT view.
      www.odoo.com/documentation/13.0/reference/views.html#pivot
      As there are many other supported views also available.
      Thank You,

  • @magilan3734
    @magilan3734 2 ปีที่แล้ว

    Very comfortable for me

  • @charlesdonboscoa4041
    @charlesdonboscoa4041 4 ปีที่แล้ว

    Hi I have a doubts on report when we design xml file inside we can put how we can print or know about docs value Sir

    • @Weblearns
      @Weblearns  4 ปีที่แล้ว +1

      Hi Charles,
      When you select from list view or form view or from backend to trying to print record here doc means recordset so that's why we are using for loop so each record print as separate pdf file (in same pdf).
      Let me know if I missed anything here.
      Thank You

    • @charlesdonboscoa4041
      @charlesdonboscoa4041 4 ปีที่แล้ว

      @@Weblearns how can I print the docs value in XML Sir

    • @charlesdonboscoa4041
      @charlesdonboscoa4041 4 ปีที่แล้ว

      How can I print any Xml value in console

    • @Weblearns
      @Weblearns  4 ปีที่แล้ว +1

      Hi Charles,
      Regarding xml value you can't print in browser console.

    • @charlesdonboscoa4041
      @charlesdonboscoa4041 4 ปีที่แล้ว

      @@Weblearns ok sir

  • @ridhatlati1310
    @ridhatlati1310 2 ปีที่แล้ว

    Hello sir, in the previous video, when adding a Many2one relation to the student model, you didn't have to inherit the school model, now to add the One2many relation you had to inherit! is that optional or mandatory?

    • @Weblearns
      @Weblearns  2 ปีที่แล้ว +1

      Well in odoo when you want to want to show child data in parent model that time you can use o2m field and here we don't need to override actual class only we need is to add field in parent model as o2m field.

  • @kevinlall7058
    @kevinlall7058 4 ปีที่แล้ว +1

    Good stuff, are you going to get into the javascript side?

    • @Weblearns
      @Weblearns  4 ปีที่แล้ว +2

      Yes, Once complete basic concept.

  • @decajohn6786
    @decajohn6786 3 ปีที่แล้ว

    is it possible to make o2m as display only (like information board)? so, when we click save (create or edit), this o2m field will not be save to parent model..
    I have created onchange method to display o2m fields based on another field, and also set o2m field as read only.
    when I click save button, o2m tree view will be deleted automatically, and these o2m tree view will not be transfer or store to parent model.
    i.e: display lecturer's workday and time, when selecting the lecturer's name.
    my temporary solution is by creating wizard. perhaps you have an alternative solution like you always did?

    • @Weblearns
      @Weblearns  3 ปีที่แล้ว +1

      Sorry I didn't get your question. Please describe more.

    • @decajohn6786
      @decajohn6786 3 ปีที่แล้ว +1

      @@Weblearns What I mean is display one2many field and not store to the parent model when i click save button. but it solved now.

  • @kishanramani4050
    @kishanramani4050 3 ปีที่แล้ว

    Hello sir,
    Renderer is not a constructor,this error occurs even after upgrading module and while opening a school.
    plz reply sir.

    • @Weblearns
      @Weblearns  3 ปีที่แล้ว

      Hi Kishan,
      Are you using weblearns addons or your module also pls specify more like which version you are working?

  • @shomi1806
    @shomi1806 2 ปีที่แล้ว

    hello how i use one2many many2one with widget one2many_list

  • @thanshidhap.p4743
    @thanshidhap.p4743 3 ปีที่แล้ว

    Helloo sir, do you know how to fetch same One2many field for another class

    • @Weblearns
      @Weblearns  3 ปีที่แล้ว +1

      Hi Thanshidha,
      As per your query please check below scenario.
      Using search query you will get same result.
      But if you will provide more info it would be good to understand like model detail and why you need to use same data in other mode.
      Thanks

    • @thanshidhap.p4743
      @thanshidhap.p4743 3 ปีที่แล้ว

      @@Weblearns actually i want to fetch some date from one2many field. My module name is student details. I have a one2many field in that(name, subject, marks) And i have a sub menu failed students. So iwant to show the marks below 50 students from the student details one2many field to the failed students submenu.i don't know how to fetch data from one2many field to other class

    • @Weblearns
      @Weblearns  3 ปีที่แล้ว +1

      @@thanshidhap.p4743 well, you can create new student view and add one domain in window action like marks

  • @charlesdonboscoa4041
    @charlesdonboscoa4041 3 ปีที่แล้ว

    How to update value inside o2m fields I have following scenario
    Qty = qty+field name
    For o2m field inside I have a qty_done field how can I update Qty value to this field

    • @Weblearns
      @Weblearns  3 ปีที่แล้ว +1

      lets say sale_line is o2m field and having qty_done field and parent field is qty as mentioned above.
      Here you can iterate (Loop) sale_line and update like this way.
      qty = qty + field_name.qty (Here field_name should have integer or float value)
      for line in self.sale_line:
      line.qty_done = qty
      Let me know if I miss-understood.
      Thank You

    • @charlesdonboscoa4041
      @charlesdonboscoa4041 3 ปีที่แล้ว

      @@Weblearns thank you Sir

  • @sparshjain8148
    @sparshjain8148 4 ปีที่แล้ว

    Please make a vedio on @api

    • @Weblearns
      @Weblearns  4 ปีที่แล้ว

      Sure will add in todo list :)

  • @sngokani
    @sngokani 4 ปีที่แล้ว +1

    Gujrati?

    • @sngokani
      @sngokani 4 ปีที่แล้ว +1

      jai Shree Krishna mota bhai , thanks videos mate, hu odoo sikhu 6u ne aa bov kam lage 6🙏

    • @Weblearns
      @Weblearns  4 ปีที่แล้ว +2

      Jai Shree Krishna bhai, Aabhar tmaro and support krta rejo :) and tamara group ma share krta rejo.

    • @sngokani
      @sngokani 4 ปีที่แล้ว

      @@Weblearns chokkas bhai 😀🙂