How To Inherit And Add Field To One2many Field In Odoo

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

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

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

    Hey guys, what would be the best way to inherit a custom field's information from stock to sale order line? I have tried related field, but it only fills in the name of the column when I add products it doesn't bring the information for that field. Cheers

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

      tried a computed field ?

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

      @@OdooMates no I haven't, can't say I'm confident in figuring out how computed fields work but I'll give it a go. Do you guys happen to have any examples similar to my issue?

    • @PallaviSrivastava-g9n
      @PallaviSrivastava-g9n ปีที่แล้ว

      @@seanbentsen163 Hi did u find the solution?

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

    How to inherit the whole one2many field?

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

      Can you elaborate, suppose if it is sale order line , what you are looking to do

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

      @@OdooMates I need that, while clicking the customer name, the list of products are want to be filled automatically. only one click for selecting the customer. for different customers, there will be a different product.can you please help me in this
      Thanks

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

      @@sanjaibalajinallasivam3291 th-cam.com/video/LE7E2O4lBrQ/w-d-xo.html

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

    I have tried this in odoo 14 but the field didn't appear in the form?

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

      Can we see the code..

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

      @@OdooMates < xpath expr ="//field[@name='invoice_line_ids']/form//field [@name='product_id']" position="after">

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

      So you are adding the field to one2many form ? Can you confirm that you checked in one2many form not in one2many treee

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

      @@OdooMates know it's added to the form view.but it don't get information from.same problem in 7:00min

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

      Your inherited view get added in the db, can you check views menu

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

    i try this on stock.picking it gives error!!

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

      Did you checked the original view? Inside one2many is there is a inline tree defined or not ?

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

      @@OdooMates the function was not defined in its class 😁