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

[fix] Montant rejeté

parent cef51375
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -28,6 +28,7 @@ class ScopCotisationsIDF(models.Model): ...@@ -28,6 +28,7 @@ class ScopCotisationsIDF(models.Model):
type = fields.Selection([ type = fields.Selection([
('inv', 'Cotisation'), ('inv', 'Cotisation'),
('refund', 'Avoir'), ('refund', 'Avoir'),
('reject', 'Rejet'),
('pay', 'Paiment')], ('pay', 'Paiment')],
string='Type', ) string='Type', )
lettrage = fields.Char('Lettrage') lettrage = fields.Char('Lettrage')
...@@ -70,11 +71,6 @@ class ScopCotisationsIDF(models.Model): ...@@ -70,11 +71,6 @@ class ScopCotisationsIDF(models.Model):
# ------------------------------------------------------ # ------------------------------------------------------
# Computed fields # Computed fields
# ------------------------------------------------------ # ------------------------------------------------------
# @api.multi
# def _compute_currency(self):
# for r in self:
# r.currency_id = r.env
@api.depends('payment_or_refund_ids', 'debit', @api.depends('payment_or_refund_ids', 'debit',
'payment_or_refund_ids.debit', 'payment_or_refund_ids.debit') 'payment_or_refund_ids.debit', 'payment_or_refund_ids.debit')
@api.multi @api.multi
......
...@@ -28,6 +28,7 @@ class ScopinvoiceIDF(models.Model): ...@@ -28,6 +28,7 @@ class ScopinvoiceIDF(models.Model):
type = fields.Selection([ type = fields.Selection([
('inv', 'Facture'), ('inv', 'Facture'),
('refund', 'Avoir'), ('refund', 'Avoir'),
('reject', 'Rejet'),
('pay', 'Paiment')], ('pay', 'Paiment')],
string='Type',) string='Type',)
lettrage = fields.Char('Lettrage') lettrage = fields.Char('Lettrage')
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
<field name="currency_id" invisible="1"/> <field name="currency_id" invisible="1"/>
<field name="credit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '=', 'inv')]}"/> <field name="credit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '=', 'inv')]}"/>
<field name="debit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '!=', 'inv')]}"/> <field name="debit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '!=', 'inv')]}"/>
<field name="debit" widget="monetary" string="Montant rejeté" attrs="{'invisible': [('type', '!=', 'reject')]}"/>
<field name="amount_residual" widget="monetary" <field name="amount_residual" widget="monetary"
attrs="{'invisible': [('type', '!=', 'inv')]}"/> attrs="{'invisible': [('type', '!=', 'inv')]}"/>
<field name="invoice_id" <field name="invoice_id"
...@@ -157,6 +158,7 @@ ...@@ -157,6 +158,7 @@
<filter name="group_by_partner_id" string="Adhérent" context="{'group_by':'partner_id'}"/> <filter name="group_by_partner_id" string="Adhérent" context="{'group_by':'partner_id'}"/>
<separator/> <separator/>
<filter string="Date écriture" name="groupby_writing_date" context="{'group_by':'writing_date'}"/> <filter string="Date écriture" name="groupby_writing_date" context="{'group_by':'writing_date'}"/>
<filter string="Type" name="groupby_type" context="{'group_by':'type'}"/>
</group> </group>
</search> </search>
</field> </field>
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
<field name="currency_id" invisible="1"/> <field name="currency_id" invisible="1"/>
<field name="credit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '=', 'inv')]}"/> <field name="credit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '=', 'inv')]}"/>
<field name="debit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '!=', 'inv')]}"/> <field name="debit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '!=', 'inv')]}"/>
<field name="debit" widget="monetary" string="Montant rejeté" attrs="{'invisible': [('type', '!=', 'reject')]}"/>
<field name="amount_residual" widget="monetary" <field name="amount_residual" widget="monetary"
attrs="{'invisible': [('type', '!=', 'inv')]}"/> attrs="{'invisible': [('type', '!=', 'inv')]}"/>
<field name="invoice_id" <field name="invoice_id"
...@@ -149,6 +150,7 @@ ...@@ -149,6 +150,7 @@
<filter name="group_by_partner_id" string="Adhérent" context="{'group_by':'partner_id'}"/> <filter name="group_by_partner_id" string="Adhérent" context="{'group_by':'partner_id'}"/>
<separator/> <separator/>
<filter string="Date écriture" name="groupby_writing_date" context="{'group_by':'writing_date'}"/> <filter string="Date écriture" name="groupby_writing_date" context="{'group_by':'writing_date'}"/>
<filter string="Type" name="groupby_type" context="{'group_by':'type'}"/>
</group> </group>
</search> </search>
</field> </field>
......
...@@ -126,10 +126,16 @@ class ScopImportIDFWizard(models.TransientModel): ...@@ -126,10 +126,16 @@ class ScopImportIDFWizard(models.TransientModel):
else: else:
debit = int(row['Débit euro']) debit = int(row['Débit euro'])
credit = int(row['Crédit euro']) credit = int(row['Crédit euro'])
if debit > 0 and credit > 0:
logs += "<li> Ligne " + str(
line) + ": Montants incorrects</li>"
else:
if journal == "VE" and debit > 0: if journal == "VE" and debit > 0:
line_type = "inv" line_type = "inv"
elif journal == "BFC" and debit == 0: elif journal == "BFC" and credit > 0:
line_type = "pay" line_type = "pay"
elif journal == "BFC" and debit > 0:
line_type = "reject"
else: else:
line_type = "refund" line_type = "refund"
......
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