Inherit and add New Value To Selection Field Odoo

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

КОМЕНТАРІ • 37

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

    thanks alot

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

    great, what if I want to edit the existing selection .. is it possible?

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

      you mean to change existing selection label ?

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

      @@OdooMates Yeah ex i want to replace it with my own

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

      @@huzaifaelnaeem2636 you can try rewriting it using the selection_add with same key and different labels

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

      @@OdooMates awesome it's work thanks alot ❤️

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

      @@huzaifaelnaeem2636 glad it helped

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

    Even I am also having the same problem (Henry Chea) of "Could not able to select the newly created radio button option = Odoo mates" in the above video. If we select the new one, its going back to the "Company / Individual" old options again

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

    i add new value 'Aop' but nothing hapen when i select on aop i want same form like company when i select aop if i company_type = fields.Selection(
    selection_add=[('company','Aop')]) it shows two selection value individual and aop and i want 3 value individual ,company , aop help me i tried alot could not get it
    if i add selection_add=[('aop','Aop')]) it shows three value but not clickable aop

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

    what if I want to remove from selection list instead of add?

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

      i think you have to rewrite the field, by removing the value

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

    please how can i add translate True in selection field

    • @OdooMates
      @OdooMates  Рік тому

      you mean how to translate values of selection field ?

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

    How to replace a new option in existing select field in Odoo

    • @OdooMates
      @OdooMates  Рік тому

      Using selection add, try with same key and different string

  • @MuhammadImranSarwar-dh4rv
    @MuhammadImranSarwar-dh4rv 4 роки тому

    First of all that is very good video. Sir i have question i want res.partner field address it will show in my custom module. For example in my custom module there must be a plus icon when i click on that icon it show me vertical div of different field names and that when we click on any field name it must append on parent view please guide me how can i achieve that Thanks

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

    Q1. How to exclude or replace a field in selection type field?

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

      You have to replace the existing field in custom modules, by removing the unwanted selection from it.

  • @ashaAhmed-hi5yl
    @ashaAhmed-hi5yl 3 роки тому +1

    How to rename the existing filed or romve it

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

      need to change the label of the field ? can be done using the xml by xpath and changing the string attribute or by replacing the field from python

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

    great...

  • @IT-sl1nq
    @IT-sl1nq 4 роки тому +1

    how to change states order ?

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

      for adding a new state ?

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

    Hello after creating the extra field, I can't select it. It keeps moving back to individual

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

      Moving back means ? Newly added field can't see in the views ?

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

      @@OdooMates When I select the field like in the video Odoo mates, it doest stay selected. Instead i will auto select back to individual

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

      Can you show the code

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

      @@OdooMates I generated a module with odoo-bin scaffold then made a models.py in models folder here is the code in models.py ```# -*- coding: utf-8 -*-
      from odoo import models, fields, api
      class bsicontacts(models.Model):
      _inherit = 'res.partner'
      company_type = fields.Selection(selection_add=[('vendor', 'Vendor')])```

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

      @@OdooMates Here's what it looks like imgur.com/a/mc9M3UG

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

    Hello all, how to call tree list data on website

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

      Yet we haven't published a video on it. If it is urgent for you, you can check how the records are arranged in the portal and also the list view for products in eCommerce

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

      @@OdooMates Thanks