How to Add One2many Fields In Odoo

Поділитися
Вставка
  • Опубліковано 31 жов 2024

КОМЕНТАРІ • 100

  • @Albaraa-Omar
    @Albaraa-Omar Рік тому +1

    Thank you very much, you have solved a very big problem for me❤

  • @rodolfosanchezflores
    @rodolfosanchezflores 4 роки тому +6

    the best free tutorial really!

  • @metalmlover
    @metalmlover 2 роки тому +1

    Hello Odoo Mates. Hope you're doing great. Is there technically any difference between creating a one2many field on patient model for appointments and creating a model appointments with required patient_id like we did in the course?

    • @OdooMates
      @OdooMates  2 роки тому +1

      both will have same effect in the db

    • @metalmlover
      @metalmlover 2 роки тому +1

      @@OdooMates Thank you ❤️

    • @OdooMates
      @OdooMates  2 роки тому

      ❤️

  • @dronix1969
    @dronix1969 2 роки тому +1

    excellent video thanks for the contribution, a query in the one2many fields can create an additional field where each record that is entered in one2many is counted.

    • @OdooMates
      @OdooMates  2 роки тому

      ❤️ is the query is about how to generate serial number for one2many lines, like 1 2 3 etc ?

    • @dronix1969
      @dronix1969 2 роки тому

      @@OdooMates Yes, have a field that increases with each record in the one2many, that the field goes 1 2 3 etc.

  • @renaacer
    @renaacer 2 роки тому +1

    Hi, can I grant access rights to specific fields into one2many field?
    example
    You added a one2many with product_id, product_qty and appointment_id but I want that user a only add product but no set product_qty and user b set product_qty but no change product_id

    • @OdooMates
      @OdooMates  2 роки тому

      Ifs possible to hide a field or make a field readonly field based on user group

    • @renaacer
      @renaacer 2 роки тому +1

      @@OdooMates I will investigate how to do it, you're excellent

    • @OdooMates
      @OdooMates  2 роки тому

      ❤️❤️ thanks for all the support ❤️

  • @sasindrans6059
    @sasindrans6059 2 роки тому +1

    if i do what you did in this video can i get this results iam taking about the xml file ,because i have only created module and added fields into it and save it in a tree view that why im asking can you please clarify me

    • @OdooMates
      @OdooMates  2 роки тому

      Please try to follow this playlist:
      v15: ua-cam.com/video/DKxwcMxV02U/v-deo.html
      v14: ua-cam.com/video/DJyPx5u6sd0/v-deo.html
      v12: ua-cam.com/video/BDepk0LhVuI/v-deo.html

  • @altelasoftware2992
    @altelasoftware2992 2 роки тому +1

    Hello, after adding products inside the item list, all of the product becomes the same name to each other. For example i put "remote, glass, phone" inside the list but when saving its all changed to "remote, remote, remote". Do you have this kind of problem before? please advice thank you!

    • @OdooMates
      @OdooMates  2 роки тому +1

      Not yet faced the same, can we see your code

    • @altelasoftware2992
      @altelasoftware2992 2 роки тому

      ​@@OdooMates I already solved the issue, the problem is caused by wrong configuration of inverse name inside One2many fields. inverse name supposed to be the "list_id" of the product lines, but i fill it with "product_id" instead.
      The code at first is look like this :
      product_lines = fields.One2many('combine.stock.lines', 'product_id')
      But then i solved to this :
      product_lines = fields.One2many('combine.stock.lines', 'list_id')
      Thank you for the video! Great content you have as always brother

  • @muneebhaider5861
    @muneebhaider5861 Рік тому +1

    Hi Odoo Mates.
    Can anyone tell me how to show "Add a section" option in my one2many line view
    I am using widget="section_and_note_one2many" and the "Add a section option is showing but it is working same as "add a line"
    Thanks

  • @Jahen222
    @Jahen222 4 роки тому +2

    No le doy un beso porque lo pinto, papasito me salvo la vida!! i love you

  • @asadasif4430
    @asadasif4430 4 роки тому +1

    Hello,
    Thanks for your tutorials, they really help us a lot.
    Can you also please show how to add the Unit Price, Subtotal and Grand total to the order line like we have on the Sales Order?
    Thanks

    • @OdooMates
      @OdooMates  4 роки тому

      if it is really urgent for you, see the video of adding compute fields: ua-cam.com/video/Mg80GxrKDOc/v-deo.html

    • @asadasif4430
      @asadasif4430 4 роки тому +1

      @@OdooMates thanks for the information. Its not that urgent for me, but I thought that tutorial in the future could be useful for all of us.
      Keep Up The Good Work :)

    • @OdooMates
      @OdooMates  4 роки тому

      See this: ua-cam.com/video/j981dytxE28/v-deo.html

  • @melvinguerra9563
    @melvinguerra9563 2 роки тому +1

    Is there anyway to make this using odoo studio?

    • @OdooMates
      @OdooMates  2 роки тому

      Yes, it's possible to add a one2many field using studio

    • @melvinguerra9563
      @melvinguerra9563 2 роки тому +1

      @@OdooMates Is there any video explaining this?

    • @OdooMates
      @OdooMates  2 роки тому

      We haven't made yet, but it easy, just enable studio mode, then open the form view, then from the right side you can drag and add new field of type one2many

    • @melvinguerra9563
      @melvinguerra9563 2 роки тому +1

      @@OdooMates It says I first need a many2one field and I cant understand what It means cause I already have one

    • @OdooMates
      @OdooMates  2 роки тому

      @@melvinguerra9563 first you have to create a many2one field in the one2many model, like we are creating a one2many between sale.order and sale.order.line, first add a many2one field in sale.order.line to sale.order, then from sale order add a one2many field and select the added many2one field as relation, if this is not clear for you, let us know

  • @supreetlaghate22
    @supreetlaghate22 3 роки тому +1

    Hii. How to make one2many fields responsive with onchange function? Different one2many fields as per onchange function.

    • @OdooMates
      @OdooMates  3 роки тому

      To update one2many in onchange, see this video: ua-cam.com/video/LE7E2O4lBrQ/v-deo.html

    • @OdooMates
      @OdooMates  3 роки тому

      if you need to control the visibilty of one2many fields, you can do it using the attrs in xml, by setting a temparory boolean field

  • @muzamilanwer7603
    @muzamilanwer7603 4 роки тому +1

    There is a little changing in product_id
    instead of product.product
    In our HospitalAppointmentLines class
    write this
    product_id = fields.Many2one('product.category', string='Medicine')

    • @OdooMates
      @OdooMates  2 роки тому

      its upto user, to decide whether to choose the category or product. Thanks for suggestion

  • @aboidrees
    @aboidrees 3 роки тому +1

    i cannot recognise to which playlist this video belongs, can you help with this 😰

    • @OdooMates
      @OdooMates  3 роки тому +1

      sure.
      The playlist: ua-cam.com/video/BDepk0LhVuI/v-deo.html

  • @Kirill0094
    @Kirill0094 3 роки тому +1

    Odoo Mates, How can i change the height of each line of the field one2many ? style not working :(

    • @OdooMates
      @OdooMates  3 роки тому

      is it really needed

    • @Kirill0094
      @Kirill0094 3 роки тому +1

      @@OdooMates Is this impossible to do?

    • @OdooMates
      @OdooMates  3 роки тому

      @@Kirill0094 not tried it yet

  • @abduljabbar8383
    @abduljabbar8383 3 роки тому +1

    thanks

  • @mudassarali9582
    @mudassarali9582 4 роки тому +2

    raise ValueError(message)
    ValueError: Field `appointment_line` does not exist
    any one i'm getting this error

    • @OdooMates
      @OdooMates  4 роки тому

      Can i see the code ?

    • @mudassarali9582
      @mudassarali9582 4 роки тому

      @@OdooMates sir after spending hours on this i just restart my computer and the error is gone

  • @muneebhaider5861
    @muneebhaider5861 2 роки тому

    Hi
    Hope you are fine.
    I have a list of records and i want to display the names of all the records in my list in the Validation error can you plz tell me how to achieve it
    Thank you.

    • @OdooMates
      @OdooMates  2 роки тому +1

      ",".join(list)

    • @muneebhaider5861
      @muneebhaider5861 2 роки тому

      @@OdooMates can you plz explain a little bit i am stuck

  • @viharikaarisetty7183
    @viharikaarisetty7183 2 роки тому +1

    hi sir i want to set record limit for one2many field can you help me sir

    • @OdooMates
      @OdooMates  2 роки тому

      Use constrains in odoo

    • @OdooMates
      @OdooMates  2 роки тому

      ua-cam.com/video/50cecNF3OyQ/v-deo.html

    • @viharikaarisetty7183
      @viharikaarisetty7183 2 роки тому +1

      but it is not working

    • @OdooMates
      @OdooMates  2 роки тому

      @@viharikaarisetty7183 you can debug it right ? like whats the mistake you made ? need help in it or you feel you can solve it ? have a try brother

  • @muhanadtaifour4241
    @muhanadtaifour4241 3 роки тому +1

    All your playlists are not in order
    Could you please write down ordered links

    • @OdooMates
      @OdooMates  3 роки тому

      First of all sorry for the inconvenience caused,
      We have tried to kept all the playlist in order, how we have created, if there is something missing or in mis order, can you help us to find it out, if so we will look and re arrange accordingly

    • @muhanadtaifour4241
      @muhanadtaifour4241 3 роки тому +1

      @@OdooMates Actually i just found ordered links in the description and in your github, I'm very gratitude for your great work, one of the best tutorials in the web.

    • @OdooMates
      @OdooMates  3 роки тому

      @@muhanadtaifour4241 Thanks for the support brother

  • @sylvainbonnet9227
    @sylvainbonnet9227 4 роки тому

    Hello Sir, i would need few tipps for developpment, is it possible to ask you durectly or hire your service ? i would like to thank you to share your knowlegdes with us. Best regards, Sylvain

    • @OdooMates
      @OdooMates  4 роки тому

      Hope we have replied you in email :)

  • @Al-yf1bh
    @Al-yf1bh 4 роки тому +1

    how we can hide the selected medicine in the tree view of our o2m field
    so its not appear anymore when we gonna add new medicine

    • @OdooMates
      @OdooMates  4 роки тому

      Hi, It cannot be done easily.Instead you can show a warning if same product is selected twice in the lines, is that okay ?

    • @Al-yf1bh
      @Al-yf1bh 4 роки тому

      @@OdooMates can u show a direct code for it??

    • @Al-yf1bh
      @Al-yf1bh 4 роки тому

      im having problem with it

    • @OdooMates
      @OdooMates  4 роки тому

      @@Al-yf1bh www.odoo.com/forum/help-1/question/how-to-prevent-selecting-the-same-value-in-one2many-field-in-odoo-10-131152

    • @Al-yf1bh
      @Al-yf1bh 4 роки тому

      @@OdooMates thankyou mr odoo mates
      currently im working with odoo and this is my first time
      u know your video make me know more about odoo and help me to solve something like i never face before in odoo

  • @gefr1mx
    @gefr1mx 4 роки тому

    Cómo agrego un one2many relacionado?

  • @AliRazaiamaliraza
    @AliRazaiamaliraza 5 років тому +1

    Parent model can't identify related ID from child model, in this case "appointment_id"

  • @Jahen222
    @Jahen222 4 роки тому

    lo volvería a besar!!! muaaaackkkk jejejeje

    • @OdooMates
      @OdooMates  4 роки тому

      Gracias ... si los videos son útiles, por favor, denle me gusta y espero que suscriban el canal y nos apoyen.

  • @KamranAli-lx6cm
    @KamranAli-lx6cm 4 роки тому

    Can i get the source code i have need a custom table view and i didn't understand it how to do

  • @juliancarrera9433
    @juliancarrera9433 4 роки тому +1

    Hello when implementing this code in odoo 13, I have the following error. Sorry, you do not have permission to access documents of unknown type. no group currently allows this operation. (Operation: read, User: 2)

    • @OdooMates
      @OdooMates  4 роки тому

      Did you add the access rights for the new model ?

    • @juliancarrera9433
      @juliancarrera9433 4 роки тому

      @@OdooMates
      If I did it like you do in this video, ua-cam.com/video/W5ya521uTlo/v-deo.html

    • @OdooMates
      @OdooMates  4 роки тому +1

      @@juliancarrera9433 just to confirm the issue, can you switch to super user mode and see whether the same error is there or not

    • @OdooMates
      @OdooMates  4 роки тому +1

      ua-cam.com/video/pBN3IC9ipWw/v-deo.html

    • @juliancarrera9433
      @juliancarrera9433 4 роки тому +1

      @@OdooMates I'm going to work, when I come back I will try it and tell you. Thanks a lot

  • @mudassarali9582
    @mudassarali9582 4 роки тому

    sir i have send you an email kindly reply me

  • @victordominguez7152
    @victordominguez7152 3 роки тому +1

    Any one have had this error "psycopg2.ProgrammingError: relation "solicitud_aliniamiento_definicion_paramentos" does not exist
    LINE 1: ...citud_aliniamiento_definicion_paramentos".id FROM "solicitud..." when adding a one2Many field

    • @OdooMates
      @OdooMates  3 роки тому +1

      can i see the code that you have added

    • @victordominguez7152
      @victordominguez7152 3 роки тому +1

      @@OdooMates Thank you! it was my mistake, i was using a related field that already existed in another one2Many field.

    • @OdooMates
      @OdooMates  3 роки тому +1

      @@victordominguez7152 happy that you have found the reason and resolved the case