Skip to content
Extraits de code Groupes Projets
Valider 258f0daf rédigé par jordan's avatar jordan
Parcourir les fichiers

[update] add company_id in bordereau and security rules

parent df58c62e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -67,9 +67,14 @@ class Bordereau(models.Model):
default='new',
store=True, track_visibility='onchange',)
company_id = fields.Many2one(
comodel_name='res.company',
related='base_cotisation_cg.company_id',
string="Company"
)
company_currency_id = fields.Many2one(
comodel_name='res.currency',
related='base_cotisation_cg.company_id.currency_id',
related='company_id.currency_id',
string="Company Currency", readonly=True)
amount_total_cotiz = fields.Monetary(
string='Montant total de(s) cotisation(s)',
......
......@@ -15,5 +15,15 @@
<field name="perm_unlink" eval="True"/>
</record>
<record id="cg_cotisation_cg_rule" model="ir.rule">
<field name="name">Bordereaux consultables que pour sa société</field>
<field name="model_id" ref="cgscop_cotisation_cg.model_scop_bordereau"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_unlink" eval="True"/>
</record>
</data>
</odoo>
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter