Hi Boehm Benjamin,
This solution would surely help you.
1. Create new config parameter check the parameter inside your xml code where you load your js and css files.
2. Define your custom function in config parameter model which help you to get your parameter value.
E.g.
PARAMS = [
('your_module_name.parameter1', _('parameter_value')),
('your_module_name.parameter2', _('parameter_value')),
]
class IrConfigParameter(models.Model):
_inherit = 'ir.config_parameter'
@api.model
def get_your_parameter(self):
res = {}
for parameter, default_val in PARAMS:
value = self.env['ir.config_parameter'].get_param(parameter, default_val)
res[param] = value.strip()
return res
3. Use the function in your xml code where you will load your js,css,less file conditionally.
E.g.
<template id="assets_sample_frontend" name="give_name_which_you_want" inherit_id="web.assets_frontend">
<xpath expr="." position="inside">
<t t-set="variable_here"
t-value="request and request.env['ir.config_parameter'].get_your_parameter().get('pass_key_here')"/>
<!-- use your variable here in condition-->
<t t-if="variable_here == '1'">
<link rel="stylesheet" type="text/less" href="/your_module_name/static/src/less/sample.less"/>
<link rel="stylesheet" type="text/less" href="/your_module_name/static/src/js/your_file.js"/>
</t>
</xpath>
</template>
Hope this might help you.
Happy Odooing.
Rgds,
Anil.
why don't you implement different modules for each site to customize things individually ?