Hello everybody:
Please, i want to know how to modify the default value of currency_id in company with the new api
THanks a lot in advance
Best regards
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello everybody:
Please, i want to know how to modify the default value of currency_id in company with the new api
THanks a lot in advance
Best regards
Hello Rihene ,
Activate developer mode,
Settings > Actions > User-defined Defaults
And create your record with res.company model
If you want to put by code then you can do it by data in Odoo custom module.
Thanks
hello
Update your code into the method _get_user_currency(). into the res.company object.
or also you can achieve this using the default_get method.
Using Python you can change it like so (I changed it to South African Rand for example):
class ResCompany(models.Model):
_inherit = 'res.company'
@api.model
def _get_euro(self):
return self.sudo().env.ref('base.ZAR').id