90. How To Make Field Readonly Based On Condition In Odoo || Conditional Readonly Fields In Odoo

แชร์
ฝัง

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

  • @roytek7667
    @roytek7667 8 หลายเดือนก่อน +2

    attrs no longer work in odoo 17. how is it done in odoo 17?

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

      invisible="ttype != 'one2many'"
      readonly="ttype != 'one2many'"
      required="ttype == 'one2many'"

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

    in the view form, when we add the ref and title, it is below the field-image. Generally, the views should be created from left to right, right? But now, the field-image even though declared first, take on the right position while the ref and title stayed on the left position. Are the reasons class="oe_avatar" and class="title"? I just reversed the two and they are vertically in the order of ref-title and image. So it seems to have to do with class="oe_avatar" which allow view to be populated on the left of image.
    what if I want image on the left and title in the same horizontal position but on the right?

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

      yes oe_avatar is moving the content to the left of the screen.
      You can try to apply sytles using style attribute

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

      also oe_inline class

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

    Hi how are you? I bother you with a question, it is possible in a create, to generate several records. For example, when uploading a sales order, create a separate order that groups the items by category or if it is not feasible, when creating an invoice for an order, create an invoice for each category of products?
    Thank you very much!

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

      seems possible to achieve this, how you are going to do this ? uploading sale order means importing sale order using import button ?

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

      @@OdooMates thanks for your answer, I don't realize now how I would use the import button, but I will continue investigating, thank you very much

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

      @@libertadcapital2395

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

    Hello, with Manufacturing Orders. How can I make the Reference field editable? I don’t want my MOs being automatically generated as our serial numbers come from the Customer?

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

      You have to inherit this field and set readonly False and inherit the create function of the model and adjust the sequential value generation only if the field is empty

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

    I wanted to make specific fields read only for specific user only , how can i do that ?? Thanks in advance.

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

      How you will record in the system for which user you need to make the field readonly ?