İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3695 Görünümler

I want to know if its possible to overwrite Odoo Enterprise code using a custom module.


I know that is allowed to extend Odoo Enterprise modules to add some extra fields for example.


But what if I want to change  the normal  behavior  of  a  method,  to  do  something  extra  or  different.


For example, the name_get method for some model that belongs to an Odoo Enterprise module is:


def name_get(self):
    self.browse(self.ids).read(['odoo_field', 'another_odoo_field'])
    return [( odoo_field.id, '%s%s' % ( odoo_field '[%s] ' %  another_odoo_field or '', odoo_field ))
    for test in self]


But, I want this to work with a custom field, so, it will be something like:

def name_get(self):
    self.browse(self.ids).read(['odoo_field', 'custom_field'])
    return [( odoo_field.id, '%s%s' % ( odoo_field '[%s] ' %  custom_field or '', odoo_field ))
    for test in self]


The idea is too keep the code as similar as possible to avoid troubles with other integrations, but doing this extra thing that is needed.


I know that is allowed to add this custom field, but is also allowed to overwrite methods to work with this custom field? Or it will conflict with the "Odoo Enterprise Edition License"?


The customer has an active Odoo Enterprise subscription, for the correct number of users.


Avatar
Vazgeç
En İyi Yanıt

Hi,

it is allowed to do so. You can customize the system as per the need.

Thanks

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Oca 23
12607
1
Tem 17
4861
2
Ağu 16
6511
1
Ara 22
3580
1
Haz 20
11912