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

[fix] error domain

parent 7c981ff4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -102,12 +102,15 @@ class ScopCotisation(models.AbstractModel): ...@@ -102,12 +102,15 @@ class ScopCotisation(models.AbstractModel):
Invoice = self.env['account.invoice'] Invoice = self.env['account.invoice']
InvoiceLine = self.env['account.invoice.line'] InvoiceLine = self.env['account.invoice.line']
exisiting_invoice = Invoice.search([ domain = [
('partner_id', '=', partner.id), ('partner_id', '=', partner.id),
('year', '=', self.year), ('year', '=', self.year),
('type_contribution_id', '=', type_contribution), ('type_contribution_id', '=', type_contribution),
('bordereau_id', '=', bordereau.id) ]
]) if bordereau:
domain.append(('bordereau_id', '=', bordereau.id))
exisiting_invoice = Invoice.search(domain)
if not exisiting_invoice or is_regul: if not exisiting_invoice or is_regul:
date_invoice = date if date else self.date_cotisation date_invoice = date if date else self.date_cotisation
......
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