Record Rules in Odoo

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ธ.ค. 2024

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

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

    Thank you. Very useful instruction.Keep going and make more. Some videos of Qweb?

    • @OdooMates
      @OdooMates  ปีที่แล้ว

      thanks for the $$,
      we already have a qweb playlist, in case if you feel topic is missing or looking for let us know, we will share

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

    is there necessary to take filed related user? without that how many options we have to apply domain in this situation? i tried with name but there are also many patients with same name..........

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

    thank you for such a deep explanation brother with cases.

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

      My pleasure

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

    Another great video as usual. Keep up the good work

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

      Thanks again!

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

    Is there a video about creating the doctor with the related user? I've been following the videos (Odoo 12 Development Tutorials playlist) and haven't come across that one.

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

      not yet added in the list i think, but i can share you a sample code of creating user from code, is that helps ?

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

      @@OdooMates That'd be great, thanks

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

      @@duvenhage00 doctor = self.env['res.users'].create({
      'name': 'Michael Hawkins',
      'login': 'test',
      })

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

    Really great work Odoo Mates,
    But this video is really confuse about 2:58 part, which you don't explain about how to create that user group, and also what is the options that you use in that user group.

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

      Creating new group: www.youtube.com/watch?v=5B04X

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

      @@OdooMates The link are broken, i suppose your link is th-cam.com/video/5B04XH6jdP8/w-d-xo.html

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

      @@futhedude4848 yes you got it correctly

  • @anjum.p2645
    @anjum.p2645 4 ปีที่แล้ว +1

    Thanu so much. It's very useful

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

      happy to hear it :) if you have any queries feel free to ask :)

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

    That was informative, thanks a lot!

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

      Thanks for the love and support ❤️ 💕

  • @ferielhaddadi683
    @ferielhaddadi683 ปีที่แล้ว

    Awsome video !! I have one question please in 12:30 you've said if we didn't assign to the user any group so he can see all the records even if we had defined a group and domain in the security file ?

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

    Thanks this video saves my life

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

      Happy to hear it :)

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

    what is implied_ids? what the use of it? plz, explain it.

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

      Its similar to inherit in the python, once you give the implied_ids the rules given for that rules also will be available for the newly creating group.
      If you activate the debug mode and open the Groups form view you can see a page named Inherited, here comes the groups given in the implied_ids .
      Thanks

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

      @@OdooMates thanks

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

    Excellent explanation!

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

      Thanks brother

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

    I wanna create a record rule that lets the logged in user only to see the partners that he follows
    Can you tell me the domain force that i have to use ?

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

      in the case the res.partner model, what we feel is you cannot achieve it directly via record rules, if you write a domain with create_uid field, there will be lot of issue here and there

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

      @@OdooMates how can i achieve this functionality then ?
      Thank you

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

      @@OdooMates i have created a record rule and it is working on res.partner i just dont know what domain forse to use.
      I cant understand how mail.thread works

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

      @@muneebhaider5861 start by adding a record rule, then if you get some error, then you may have to adjust some another codes, havent tried it, but you can have a try and see

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

      @@OdooMates record rule is working fine

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

    Thank you so much but I think in the odoo 12 development playlist you need to add the video of how to create user groups before this video or this video is a bit confusing at the start

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

      Thanks for notifying

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

    how to make rule to show my team data only as manger also need to my administered or hr manger to to by pass this rule?????

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

      for this you can write a rule for this group with proper domain, a sample, 'user_id', '=', user.id , this will show only records of this users, similarly alter the rule as per your field names, then for admin to see all, write another rule with domain as '1', '=', '1' for the admin group

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

    Hi
    I created a record rule against my student group and perm_unlink is set false
    in my front end my record rule looks fine
    but still my student user is active it can delete a record
    any help?

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

      go to models menu from settings -> technical -> database structure, open the models and see whether there is any other accces rights or record rules defined for same model and same groups that provides the delete permission

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

    Thanks for the explanation :-)

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

      welcome brother :)

  • @ashaAhmed-hi5yl
    @ashaAhmed-hi5yl 3 ปีที่แล้ว +1

    How to create related user in doctor form l don't understand this step?!!!!

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

      you can create manually and link to the doctor, or by a button you can create the user for the doctor

    • @ashaAhmed-hi5yl
      @ashaAhmed-hi5yl 3 ปีที่แล้ว +1

      @@OdooMates how you can Definition it in python file

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

      @@ashaAhmed-hi5yl for creating record from code: th-cam.com/video/Jssb15ADeyg/w-d-xo.html

    • @ashaAhmed-hi5yl
      @ashaAhmed-hi5yl 3 ปีที่แล้ว +1

      @@OdooMates thanx

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

      @@ashaAhmed-hi5yl welcome :)

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

    hello sir after creating the docter model it is showing error like "Key Error : u 'hospital.patient' can you please help me

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

      after adding which code, this error is raised

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

    how to hide ACTION and PRINT button for specific users in odoo 14?

  • @jakkrits2086
    @jakkrits2086 5 ปีที่แล้ว +1

    Awesome! Love the way you show us how existing modules can be very useful reference and how easily we can navigate around them. If you get a chance, please show us your tricks on debugging using REPL (like this one ./odoo-bin shell -c odoo.conf -d hospitaldb --shell-interface=ptpython). Personally, I think peeking around values and variables in Odoo is a real pain.

    • @OdooMates
      @OdooMates  5 ปีที่แล้ว +1

      Thanks for the comment. Regarding the debugging in Odoo, we are going through the debugger option in pycharm and hope we will release a video in it soon. Welcome all your suggestions and feedbacks. Thanks

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

    Hello sir, Please help. I have created a record rule for contact where a sales person can only view a customer that is assigned to him/her
    Sales Person View Rule


    [('user_id', '=', user.id)]
    The problem is, administrator group is also affected by the record rule that I've created that throws an error when creating a new user using the administrator account.
    The requested operation ("create" on "Contact" (res.partner)) was rejected because of the following rules: - Sales Person View Rule
    (Records: Sample code (id=16), User: Administrator (id=2))
    It's a bit confusing because I did not add the administrator group in the record rule that I've created.
    I hope you can help me with this. Thank you sir!

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

    If you describe the doctor model like previous models ,,,this will be very helpful

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

      at that time, we thought not to make the followers to get bored with showing creating the model again, thus we skipped it

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

      @@OdooMates show atleast one time to think about it, and where is the manager model? where is category? those thing are showing lot of error.

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

      @@raihanhridoy4667 can you tell me which part of the video

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

      @@OdooMates Thanks for your response, I successfully debugged it.

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

      ❤️

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

    can you please show how you created "related user" field in hospital
    .doctor model. Thank you

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

      Did you see this: th-cam.com/video/pD6byjEvIx8/w-d-xo.html ?

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

      @@OdooMates Yes. Thank you for reminding. Appreciate your work.

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

    what to do now need a code behind "related users"

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

      many2one field

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

    hi if you will not show the docter module how we can go forward sir will you please show me the code atleast

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

      sorry for not including that part in the video, it is same as how we create the patient table,

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

    Awsome, thanks,
    Could you please share code in github ?

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

      github.com/odoomates/odooapps

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

    how to make rule to show my team data only as manger also need to my administered to by pass this rule

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

      for this you can write a rule for this group with proper domain, a sample, 'user_id', '=', user.id , this will show only records of this users, similarly alter the rule as per your field names, then for admin to see all, write another rule with domain as '1', '=', '1' for the admin group

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

      @@OdooMates need one user or two to bypass that rule how to do it sir can you do video about it ??

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

      @@abdikarimosman2511 create a user group called, see all records, add needed users to this group, write a rule for this group with domain 1= 1

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

      @@OdooMates how can you show me in video sorry for asking pls ??

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

      @@OdooMates I try did not work shouId I take that user from every group

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

    what is the meaning of eval=[4, - In this line what 4 means that
    sir

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

      It is linking record with another record

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

      0, 0, { values }) link to a new record that needs to be created with the given values dictionary
      (1, ID, { values }) update the linked record with id = ID (write values on it)
      (2, ID) remove and delete the linked record with id = ID (calls unlink on ID, that will delete the object completely, and the link to it as well)
      (3, ID) cut the link to the linked record with id = ID (delete the relationship between the two objects but does not delete the target object itself)
      (4, ID) link to existing record with id = ID (adds a relationship)
      (5) unlink all (like using (3,ID) for all linked records)
      (6, 0, [IDs]) replace the list of linked IDs (like using (5) then (4,ID) for each ID in the list of IDs)
      Explain what the use of all of this. Just little bit confused.

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

      thank you so much sir

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

      @@OdooMates Do you mind creating tutorial for this brother? I am so glad to know more detail for better understanding about it.
      refers to your code in file: doctor.xml, action menu ,
      it's still hard to be understood for me as well. :)

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

    for the biggners will get effected ,but dont no how to add "related users"

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

      May i know in which version you are currently developing ?

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

      if odoo 13 and higher, follow this playlist: th-cam.com/video/DJyPx5u6sd0/w-d-xo.html

  • @osamakhalid5237
    @osamakhalid5237 5 ปีที่แล้ว +1

    plz use the other theme of pycharm in next videos,,,its too dark,,,

    • @OdooMates
      @OdooMates  5 ปีที่แล้ว +2

      Actually we have tried that theme and unfortunately we are not feeling comfortable with it

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

    Have telegram 😁

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

    Movement of your screen so annoying :(

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

      yes we do realize it and stopped it in the recent videos

  • @CongNguyen-fi5cd
    @CongNguyen-fi5cd 2 หลายเดือนก่อน

    you're from india ,can you speak english clearly??

    • @OdooMates
      @OdooMates  2 หลายเดือนก่อน

      Yes from India and am speaking in best way possible for me

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

    not a good video you are not very descriptive about what you are doing and why you are doing in relevance with the output

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

      Not good ? What you need more and let us know about you exceptions? Also see other comments too .. th-cam.com/video/mzg3EGD_6Gw/w-d-xo.html

  • @smsmzean759
    @smsmzean759 11 หลายเดือนก่อน +1

    Another great video as usual. Keep up the good work

    • @OdooMates
      @OdooMates  11 หลายเดือนก่อน

      Thanks again!