Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3726 Представления

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.


Аватар
Отменить
Лучший ответ

Hi,

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

Thanks

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
янв. 23
12664
1
июл. 17
4885
2
авг. 16
6563
1
дек. 22
3600
1
июн. 20
11954