Skip to Content
Menu
This question has been flagged
1089 Views

I have created a custom field in studio, and made it computed. The objective is to get a deploy command for Odoo in odoo.sh based on the modules the customer have purchased subscription.


I am using this to get in a field the technical name of the apps concatenated. Nevertheless, odoo is translating the name of the modules and the deploy command I get is unusable: 


The field 


x_studio_field_99u64

is a many2many field bringing the modules relationship (ir.module.module)

The  field:

x_studio_field_ShsE3

is a  char  computed,  with translatable boolean not checked


for r in self:
apps = ','.join(r.x_studio_field_99u64.mapped('name'))
if 'stock' in apps:
localization = 'l10n_cl_edi_stock'
else:
localization = 'l10n_cl_edi'
r['x_studio_field_ShsE3'] = 'odoo-bin -i %s,%s --load-language es_CL --stop-after-init' % (apps, localization)



The result is this:

odoo-bin -i Almacén,Compras,Contabilidad,Invoicing Management,Ventas,l10n_cl_edi --load-language es_CL --stop-after-init


instead of:

odoo-bin -i stock,purchase....

Avatar
Discard