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

[update] calculate amount_cotiz with extern param and create invoices in extern function

parent fb9e3127
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -65,7 +65,8 @@ class ScopCotisation(models.AbstractModel):
# ------------------------------------------------------
# Global functions
# ------------------------------------------------------
def create_contribution(self, product, partner, liasse=None, amount=0):
def create_contribution(self, product, partner, type_contribution,
liasse=None, amount=0):
Invoice = self.env['account.invoice']
InvoiceLine = self.env['account.invoice.line']
member_invoice = Invoice.create({
......@@ -74,6 +75,7 @@ class ScopCotisation(models.AbstractModel):
'type': 'out_invoice',
'year': self.year,
'is_contribution': True,
'type_contribution_id': type_contribution,
'journal_id': self.company_id.contribution_journal_id.id,
'state': 'draft',
'account_id': partner.property_account_receivable_id.id,
......
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