Skip to content
Extraits de code Groupes Projets
Valider 75b6eb68 rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[fix] error domain multi-company 14.0 & remove multi company menu

parent 34260c80
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -9,7 +9,6 @@
"depends": [
"cgscop_partner",
"cgscop_cotisation",
"multi_company_menu",
],
"data": [
"security/security_rules.xml",
......
......@@ -8,18 +8,3 @@ class ScopInvoiceIDFConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
is_invoice_idf = fields.Boolean(related="company_id.is_invoice_idf", readonly=False)
# TODO: Remove during migration 14.0
def execute(self):
"""
Rewrite execute() function to add current company to the list
of available company in ir_ui_menu
"""
res = super(ScopInvoiceIDFConfigSettings, self).execute()
menu_invoice_idf = self.env.ref("cgscop_invoice_idf.menu_scop_invoice_idf")
bool_condition = self.is_invoice_idf
self.add_company_to_menu(menu_invoice_idf, bool_condition)
return res
......@@ -44,7 +44,7 @@ class ScopInvoiceIDF(models.Model):
)
debit = fields.Monetary(string="Débit", currency_field="currency_id")
credit = fields.Monetary(string="Crédit", currency_field="currency_id")
amount_residual = fields.Float(
amount_residual = fields.Monetary(
string="Reste à payer",
compute="_compute_amount_residual",
store=True,
......
......@@ -25,7 +25,7 @@
<field name="groups" eval="[(6, 0, [ref('group_cg_invoice_idf_admin')])]" />
<field
name="domain_force"
>['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
<field name="perm_read" eval="True" />
<field name="perm_write" eval="True" />
<field name="perm_create" eval="True" />
......@@ -40,7 +40,7 @@
<field name="groups" eval="[(6, 0, [ref('group_cg_invoice_idf_admin')])]" />
<field
name="domain_force"
>['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
<field name="perm_read" eval="True" />
<field name="perm_write" eval="True" />
<field name="perm_create" eval="True" />
......@@ -53,7 +53,7 @@
<field name="groups" eval="[(6, 0, [ref('group_cg_invoice_idf_admin')])]" />
<field
name="domain_force"
>['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
<field name="perm_read" eval="True" />
<field name="perm_write" eval="True" />
<field name="perm_create" eval="True" />
......
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