Skip to content
Extraits de code Groupes Projets

Comparer les révisions

Les modifications sont affichées comme si la révision source était fusionnée avec la révision cible. En savoir plus sur la comparaison des révisions.

Source

Sélectionner le projet cible
No results found
Sélectionner une révision Git
  • 12.0
  • 13.0
  • 14.0
3 résultats

Cible

Sélectionner le projet cible
  • lefilament/cgscop/cgscop_cotisation
  • hsilvant/cgscop_cotisation
2 résultats
Sélectionner une révision Git
  • 14-RV-202503401
  • 14.0
2 résultats
Afficher les modifications
Affichage de
avec 846 ajouts et 574 suppressions
......@@ -5,10 +5,30 @@ from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
_inherit = "res.partner"
contribution_report_ids = fields.One2many(
comodel_name='scop.contribution.report',
inverse_name='partner_id',
string='Cotisations',
comodel_name="scop.contribution.report",
inverse_name="partner_id",
string="Cotisations",
)
def get_partner_contribution_type(self):
"""
Returns list of contribution type for partner
"""
contribution_type = [self.env.ref("cgscop_partner.riga_14397")]
if self.ur_id in [
self.env.ref("cgscop_partner.riga_14232"),
self.env.ref("cgscop_partner.riga_14243"),
self.env.ref("cgscop_partner.riga_14231"),
]:
contribution_type.append(self.env.ref("cgscop_partner.riga_14399"))
if self.is_federation_com:
contribution_type.append(self.env.ref("cgscop_partner.riga_14398"))
# TODO: Mettre à jour avec is_federation_cae après la maj des périodes par la CG
if self.cae:
contribution_type.append(self.env.ref("cgscop_partner.cotiz_fede_cae"))
if self.is_federation_indus:
contribution_type.append(self.env.ref("cgscop_partner.cotiz_fede_indus"))
return contribution_type
# © 2020 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api
class ScopContributions(models.Model):
_inherit = "scop.contribution"
# TODO: remove after migration
invoice_id = fields.Many2one(
comodel_name='account.invoice',
string='Facture liée',
ondelete='cascade')
invoice_ids = fields.One2many(
comodel_name='account.invoice',
inverse_name='contribution_id',
string='Factures liées')
amount_paid = fields.Float(
compute='_compute_amount_paid', store=True)
amount_remaining = fields.Float(
compute='_compute_amount_remaining', store=True, readonly=False)
is_exempt = fields.Boolean(
string='Exonération',
compute='_compute_is_exempt',
default=False
)
@api.depends('amount_remaining')
@api.multi
def _compute_amount_paid(self):
for r in self:
r.amount_paid = r.amount_called - r.amount_remaining
@api.depends('invoice_ids', 'invoice_ids.residual_signed')
@api.multi
def _compute_amount_remaining(self):
for r in self:
r.amount_remaining = sum(
r.invoice_ids.mapped('residual_signed'))
@api.multi
def _compute_is_exempt(self):
for contrib in self:
if contrib.invoice_id:
is_refund = contrib.invoice_id.search([
('refund_invoice_id', '=', contrib.invoice_id.id),
('state', 'in', ['open', 'paid'])])
if is_refund:
contrib.is_exempt = True
else:
contrib.is_exempt = False
else:
contrib.is_exempt = False
def view_refund(self):
tree_id = self.env.ref(
'cgscop_cotisation.invoice_scop_contribution_refund_tree').id
refund_ids = self.invoice_id.search([
('refund_invoice_id', '=', self.invoice_id.id),
('state', 'in', ['open', 'paid'])
])
return {
'type': 'ir.actions.act_window',
'name': 'Exonérations',
'res_model': 'account.invoice',
'views': [[tree_id, 'tree']],
'target': 'new',
'domain': [['id', 'in', refund_ids.ids]],
'flags': {'action_buttons': False}
}
# © 2021 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api
from datetime import date
from odoo import fields, models
class ScopCotisation(models.AbstractModel):
_name = "scop.cotisation"
_description = "Base des cotisations"
year = fields.Selection(
[(year, str(year)) for year in range(
fields.Datetime.now().year - 1, fields.Datetime.now().year + 2)],
string='Année de cotisation',
required=True)
[
(str(year), str(year))
for year in range(
fields.Datetime.now().year - 1, fields.Datetime.now().year + 2
)
],
string="Année de cotisation",
required=True,
)
company_id = fields.Many2one(
comodel_name='res.company',
string='Company', change_default=True,
required=True, readonly=True,
default=lambda self: self.env.user.company_id)
comodel_name="res.company",
string="Company",
change_default=True,
required=True,
readonly=True,
default=lambda self: self.env.company,
)
company_currency_id = fields.Many2one(
comodel_name='res.currency', related='company_id.currency_id',
string="Company Currency", readonly=True)
comodel_name="res.currency",
related="company_id.currency_id",
string="Company Currency",
readonly=True,
)
date_cotisation = fields.Date(
string="Date calcul cotisation",
help="Date de calcul qui apparaitra sur le bordereau de cotisation"
help="Date de calcul qui apparaitra sur le bordereau de cotisation",
)
member_count = fields.Integer(
"Adhérents renouvelés",
compute='_compute_member_count')
"Adhérents renouvelés", compute="_compute_member_count"
)
new_member_count = fields.Integer(
"Nouveaux adhérents",
compute='_compute_new_member_count')
"Nouveaux adhérents", compute="_compute_new_member_count"
)
invoiced_member_count = fields.Integer(
"Cotisations créées",
compute='_compute_invoiced_member_count')
trimester_1 = fields.Date('1er Trimestre')
trimester_2 = fields.Date('2ème Trimestre')
trimester_3 = fields.Date('3ème Trimestre')
trimester_4 = fields.Date('4ème Trimestre')
"Cotisations créées", compute="_compute_invoiced_member_count"
)
trimester_1 = fields.Date("1er Trimestre")
trimester_2 = fields.Date("2ème Trimestre")
trimester_3 = fields.Date("3ème Trimestre")
trimester_4 = fields.Date("4ème Trimestre")
# ------------------------------------------------------
# Compute fields
# ------------------------------------------------------
@api.multi
def _compute_member_count(self):
for cotiz in self:
cotiz.member_count = len(cotiz.get_members())
@api.multi
def _compute_new_member_count(self):
for cotiz in self:
cotiz.new_member_count = len(cotiz.get_new_members())
@api.multi
def _compute_invoiced_member_count(self):
for cotiz in self:
cotiz.invoiced_member_count = len(
cotiz.invoice_ids.mapped('partner_id'))
cotiz.invoiced_member_count = len(cotiz.invoice_ids.mapped("partner_id"))
# ------------------------------------------------------
# Global functions
# ------------------------------------------------------
@api.multi
def get_members(self):
self.ensure_one()
members = self.env['scop.membership.period'].search([
('type_id', '=', self.env.ref(
'cgscop_partner.membership_type_1').id),
('start', '<', date(self.year, 1, 1)),
('end', '=', None),
]).mapped('partner_id')
members = (
self.env["scop.membership.period"]
.search(
[
(
"type_id",
"=",
self.env.ref("cgscop_partner.membership_type_1").id,
),
("start", "<", date(int(self.year), 1, 1)),
("end", "=", None),
]
)
.mapped("partner_id")
)
return members
@api.multi
def get_new_members(self, limit_start_date=None):
if not limit_start_date:
limit_start_date = date(self.year, 12, 31)
limit_start_date = date(int(self.year), 12, 31)
self.ensure_one()
members = self.env['scop.membership.period'].search([
('type_id', '=', self.env.ref(
'cgscop_partner.membership_type_1').id),
('start', '>=', date(self.year, 1, 1)),
('start', '<=', limit_start_date),
'|',
('end', '=', None),
('end', '>', date(self.year, 1, 1))
]).mapped('partner_id')
members = (
self.env["scop.membership.period"]
.search(
[
(
"type_id",
"=",
self.env.ref("cgscop_partner.membership_type_1").id,
),
("start", ">=", date(int(self.year), 1, 1)),
("start", "<=", limit_start_date),
"|",
("end", "=", None),
("end", ">", date(int(self.year), 1, 1)),
]
)
.mapped("partner_id")
)
return members
def round_to_closest_multiple(self, float_to_round, multiple):
......@@ -102,8 +125,7 @@ class ScopCotisation(models.AbstractModel):
large_multiple = small_multiple + multiple
# Return the closest of two
if abs(float_to_round - small_multiple) < \
abs(float_to_round - large_multiple):
if abs(float_to_round - small_multiple) < abs(float_to_round - large_multiple):
return small_multiple
else:
return large_multiple
# © 2021 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class CotisationTask(models.Model):
_name = 'scop.cotisation.task'
_description = 'Gestion des créations des cotisations'
year = fields.Integer('Année')
message = fields.Char("Message")
cotiz_created = fields.Integer("Appels de cotisation / Bordereaux créés")
cotiz_to_create = fields.Integer(
"Appels de cotisation / Bordereaux à créer")
is_error = fields.Boolean('En erreur', default=False)
status = fields.Selection([
('in_process', 'En cours'),
('done', 'Terminé')
], string='Statut')
company_id = fields.Many2one(
comodel_name='res.company',
string='Company', change_default=True,
required=True, readonly=True,
default=lambda self: self.env.user.company_id)
# © 2020 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import account_invoice_all
from . import scop_contribution_report
# © 2020 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class AccountInvoiceReport(models.Model):
_inherit = "account.invoice.all"
def _subquery(self):
query = super()._subquery()
query = query + " AND is_contribution is false"
return query
# © 2022 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import tools
from odoo import models, fields, api
import logging
from psycopg2.extensions import AsIs
from odoo import api, fields, models, tools
_logger = logging.getLogger(__name__)
class ScopContributionReport(models.Model):
_name = "scop.contribution.report"
_description = "Vue cotisations"
_auto = False
_order = 'year desc, partner_id'
_order = "year desc, partner_id"
name = fields.Char(compute="_compute_name")
year = fields.Char("Année de cotisation")
source = fields.Selection(
string="Source",
selection=[("odoo", "Odoo")],
required=True,
)
name = fields.Char(compute='_compute_name')
year = fields.Char('Année de cotisation')
type_contribution_id = fields.Many2one(
comodel_name="scop.contribution.type",
string="Type de cotisation",
readonly=True)
partner_id = fields.Many2one('res.partner', string='Partner', readonly=True)
amount_called = fields.Float('Montant Appelé')
amount_paid = fields.Float('Montant Payé')
amount_due = fields.Float('Montant Restant')
is_loss = fields.Boolean('Exonération/Perte', compute="_compute_is_loss")
payments = fields.Html('Paiements', compute="_compute_payments")
readonly=True,
)
partner_id = fields.Many2one("res.partner", string="Partner", readonly=True)
amount_called = fields.Float("Montant Appelé")
amount_paid = fields.Float("Montant Payé")
amount_due = fields.Float("Montant Restant")
is_loss = fields.Boolean("Exonération/Perte", compute="_compute_is_loss")
payments = fields.Html("Paiements", compute="_compute_payments")
_depends = {
'account.invoice': [
'year', 'type_contribution_id', 'partner_id',
'amount_total_signed', 'residual_company_signed',
'state', 'type', 'is_contribution', 'refund_invoice_id'
"account.move": [
"year",
"type_contribution_id",
"partner_id",
"amount_total_signed",
"amount_residual_signed",
"state",
"move_type",
"is_contribution",
"payment_state",
],
}
......@@ -38,27 +56,29 @@ class ScopContributionReport(models.Model):
def _select_invoice(self):
select_str = """
SELECT
'odoo' as source,
CAST(i.year AS VARCHAR),
i.type_contribution_id,
i.partner_id,
SUM(i.amount_total_signed) AS amount_called,
SUM(i.amount_total_signed - i.residual_company_signed) AS amount_paid,
SUM(i.residual_company_signed) AS amount_due
SUM(i.amount_total_signed - i.amount_residual_signed) AS amount_paid,
SUM(i.amount_residual_signed) AS amount_due
"""
return select_str
def _from_invoice(self):
from_str = """
FROM
account_invoice i
account_move i
"""
return from_str
def _where_invoice(self):
where_str = """
WHERE
i.state in ('open', 'paid', 'in_payment') AND
i.is_contribution = true
i.state = 'posted'
AND i.move_type in ('out_invoice', 'out_refund')
AND i.is_contribution = true
"""
return where_str
......@@ -73,8 +93,11 @@ class ScopContributionReport(models.Model):
def _query_invoice(self):
query = "(%s %s %s %s)" % (
self._select_invoice(), self._from_invoice(),
self._where_invoice(), self._groupby_invoice())
self._select_invoice(),
self._from_invoice(),
self._where_invoice(),
self._groupby_invoice(),
)
return query
def _subquery(self):
......@@ -87,6 +110,7 @@ class ScopContributionReport(models.Model):
select_str = """
SELECT
ROW_NUMBER() OVER(ORDER BY c.year, c.partner_id) AS id,
c.source,
c.year,
c.type_contribution_id,
c.partner_id,
......@@ -102,7 +126,8 @@ class ScopContributionReport(models.Model):
GROUP BY
c.year,
c.type_contribution_id,
c.partner_id
c.partner_id,
c.source
"""
def _query_order(self):
......@@ -110,35 +135,40 @@ class ScopContributionReport(models.Model):
def _query(self):
query = (
self._select() + self._subquery() + ') c ' +
self._query_groupby() + self._query_order()
self._select()
+ self._subquery()
+ ") c "
+ self._query_groupby()
+ self._query_order()
)
return query
@api.model_cr
@api.model
def init(self):
tools.drop_view_if_exists(self.env.cr, self._table)
self.env.cr.execute("""CREATE or REPLACE VIEW %s as (
%s
)""" % (
self._table, self._query()))
self.env.cr.execute(
"CREATE or REPLACE VIEW %s as (%s)",
(AsIs(self._table), AsIs(self._query())),
)
self._set_ro_table()
# ------------------------------------------------------
# Computed fields
# ------------------------------------------------------
@api.multi
def _compute_is_loss(self):
for contribution in self:
contribution.is_loss = contribution._get_is_loss()
@api.multi
def _compute_name(self):
for contribution in self:
contribution.name = (contribution.year + ' - ' +
contribution.type_contribution_id.name +
' - ' + contribution.partner_id.name)
contribution.name = (
contribution.year
+ " - "
+ contribution.type_contribution_id.name
+ " - "
+ contribution.partner_id.name
)
@api.multi
def _compute_payments(self):
for contribution in self:
contribution.payments = contribution._get_payment()
......@@ -147,12 +177,22 @@ class ScopContributionReport(models.Model):
# Business functions
# ------------------------------------------------------
def _get_is_loss(self):
invoice_ids = self.env['account.invoice'].search([
('year', '=', int(self.year)),
('partner_id', '=', self.partner_id.id),
('type_contribution_id', '=', self.type_contribution_id.id),
])
refund_ids = invoice_ids.filtered(lambda i: i.type == 'out_refund')
invoice_ids = (
self.env["account.move"]
.sudo()
.search(
[
("year", "=", int(self.year)),
("partner_id", "=", self.partner_id.id),
(
"type_contribution_id",
"=",
self.type_contribution_id.id,
),
]
)
)
refund_ids = invoice_ids.filtered(lambda i: i.move_type == "out_refund")
if refund_ids:
return True
else:
......@@ -160,33 +200,35 @@ class ScopContributionReport(models.Model):
def _get_payment(self):
self.ensure_one()
invoice_ids = self.env['account.invoice'].search([
('year', '=', int(self.year)),
('partner_id', '=', self.partner_id.id),
('type_contribution_id', '=', self.type_contribution_id.id),
('type', '=', 'out_invoice'),
('bordereau_id.state', 'not in', ('cancel',))
])
payment_ids = invoice_ids.mapped('payment_move_line_ids')
payments_html = False
if self.source == "odoo":
invoice_ids = self.get_invoice_contribution()
payment_ids = invoice_ids.mapped("move_line_payment_ids").filtered(
lambda p: p.move_id.move_type == "entry"
)
if payment_ids:
payments = payment_ids.mapped(lambda p: {
'date': p.date,
'name': p.name,
'ref': p.ref,
'credit': p.credit,
'class': ''
} if not p.invoice_id else {
'date': p.date,
'name': p.name,
'ref': '',
'credit': p.credit,
'class': 'text-danger'
})
payments = payment_ids.mapped(
lambda p: {
"date": p.date,
"name": p.name,
"ref": p.ref,
"credit": p.credit,
"class": "",
}
)
payments_html = self._get_html_table(payments)
else:
payments_html = "<p>Il n'y a pas de paiements associés à cette cotisation</p>"
if not payments_html:
payments_html = (
"<p>Il n'y a pas de paiements associés à cette cotisation</p>"
)
return payments_html
def get_invoice_contribution(self):
invoice_ids = (
self.env["account.move"].sudo().search(self._get_contribution_domain())
)
return invoice_ids
def _get_html_table(self, payments):
"""
:param payments: list of dict {date, name, ref, amount}
......@@ -211,10 +253,26 @@ class ScopContributionReport(models.Model):
<td>%s</td>
<td class='text-right'>%.2f €</td>
</tr>
""" % (payment.get('class', ''),
payment.get('date', '').strftime('%d/%m/%Y'),
payment.get('name', ''), payment.get('ref', ''),
payment.get('credit', 0.0),)
""" % (
payment.get("class", ""),
payment.get("date", "").strftime("%d/%m/%Y"),
payment.get("name", ""),
payment.get("ref", ""),
payment.get("credit", 0.0),
)
end_html = "</tbody></table>"
return start_html + content_html + end_html
def _get_contribution_domain(self):
return [
("year", "=", int(self.year)),
("partner_id", "=", self.partner_id.id),
(
"type_contribution_id",
"=",
self.type_contribution_id.id,
),
("move_type", "=", "out_invoice"),
("state", "=", "posted"),
]
......@@ -10,15 +10,43 @@
<field name='partner_id' />
<field name="year" />
<field name="type_contribution_id" />
<filter name="filter_paid" string="À régler" domain="[('amount_due', '!=', 0)]"/>
<filter name="filter_paid" string="Réglé" domain="[('amount_due', '=', 0)]"/>
<separator></separator>
<filter name="filter_cg" string="Cotisations CG" domain="[('type_contribution_id', '=', 1)]"/>
<filter name="filter_ur" string="Cotisations UR" domain="[('type_contribution_id', '=', 3)]"/>
<filter name="filter_fede" string="Cotisations Fédé" domain="[('type_contribution_id', '=', 2)]"/>
<filter
name="filter_paid"
string="À régler"
domain="[('amount_due', '!=', 0)]"
/>
<filter
name="filter_paid"
string="Réglé"
domain="[('amount_due', '=', 0)]"
/>
<separator />
<filter
name="filter_cg"
string="Cotisations CG"
domain="[('type_contribution_id', '=', 1)]"
/>
<filter
name="filter_ur"
string="Cotisations UR"
domain="[('type_contribution_id', '=', 3)]"
/>
<filter
name="filter_fede"
string="Cotisations Fédé"
domain="[('type_contribution_id', '=', 2)]"
/>
<group expand="0" string="Group By">
<filter name="group_by_type_contribution_id" string="Type de cotisation" context="{'group_by':'type_contribution_id'}"/>
<filter name="group_by_year" string="Année" context="{'group_by':'year'}"/>
<filter
name="group_by_type_contribution_id"
string="Type de cotisation"
context="{'group_by':'type_contribution_id'}"
/>
<filter
name="group_by_year"
string="Année"
context="{'group_by':'year'}"
/>
</group>
</search>
</field>
......@@ -48,7 +76,7 @@
<form string="Cotisations">
<sheet>
<h2><field name="name" /></h2>
<separator></separator>
<separator />
<table class="table table-striped table-hover">
<thead>
<tr>
......@@ -65,7 +93,7 @@
</tr>
</tbody>
</table>
<separator></separator>
<separator />
<h4>Détail des Paiements</h4>
<field name='payments' widget="html" />
</sheet>
......
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_scop_cotisation_task,access_scop_cotisation_task,model_scop_cotisation_task,account.group_account_manager,1,1,1,0
admin_access_scop_cotisation_task,admin_access_scop_cotisation_task,model_scop_cotisation_task,cgscop_partner.group_cg_administrator,1,1,1,1
access_scop_contribution_report_user,access_scop_contribution_report_user,model_scop_contribution_report,base.group_user,1,0,0,0
access_account_banking_mandate_change_wizard,access_account_banking_mandate_change_wizard,model_account_banking_mandate_change_wizard,account.group_account_manager,1,1,1,1
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<data noupdate="0">
<record id="cg_cotisation_task_rule" model="ir.rule">
<field name="name">Tâches créations cotisations consultables que pour sa société</field>
<field name="model_id" ref="cgscop_cotisation.model_scop_cotisation_task"/>
<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
static/description/icon.png

8,95 ko | W: 0px | H: 0px

static/description/icon.png

15,5 ko | W: 0px | H: 0px

static/description/icon.png
static/description/icon.png
static/description/icon.png
static/description/icon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -6,10 +6,12 @@
<t t-extend="ShowPaymentInfo">
<t t-jquery='div.oe_form_field' t-operation='replace'>
<div class="oe_form_field"
<div
class="oe_form_field"
style="margin-right: 10px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;"
t-att-title="line.date_maturity + ' - ' + line.title">
<t t-esc="line.date_maturity"></t> - <t t-esc="line.invoice"></t>
t-att-title="line.date_maturity + ' - ' + line.journal_name"
>
<t t-esc="line.date_maturity" /> - <t t-esc="line.journal_name" />
</div>
</t>
</t>
......
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Copyright 2020 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<data>
<record id="view_mandate_form_inherit" model="ir.ui.view">
<field name="name">scop.view.mandate.form</field>
<field name="model">account.banking.mandate</field>
<field name="inherit_id" ref="account_banking_mandate.view_mandate_form" />
<field name="priority" eval="90" />
<field name="arch" type="xml">
<xpath expr="//group[@name='main']" position="before">
<div class="col-12 mt16 mb16" name="change_mandate_button">
<button
name="set_payment_order"
type="object"
class="btn-outline-info"
string="Affecter le prélèvement comme mode de paiement par défaut"
attrs="{'invisible': [('state', '!=', 'valid')]}"
confirm="Valider le prélèvement par défaut pour la coopérative ?"
/>
<button
name="set_invoice_mandate"
type="object"
class="btn-outline-info"
style="margin-left: 15px;"
string="Affecter ce mandat aux factures ouvertes"
context="{'action_type': 'update_mandate'}"
attrs="{'invisible': [('state', '!=', 'valid')]}"
/>
<button
name="set_invoice_mandate"
type="object"
class="btn-outline-danger"
style="margin-left: 15px;"
string="Affecter 'Virement' aux factures et cotisations ouvertes"
context="{'action_type': 'remove_mandate'}"
attrs="{'invisible': [('state', 'not in', ['expired', 'cancel'])]}"
/>
</div>
</xpath>
</field>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Form -->
<record id="invoice_form_scop_inherited" model="ir.ui.view">
<field name="name">account.invoice.form.scop.inherited</field>
<field name="model">account.invoice</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="partner_ur_id" readonly="1" groups="base.group_no_one"/>
<field name="is_contribution" readonly="1" groups="base.group_no_one"/>
<field name="year" readonly="1"/>
</field>
<xpath expr="//sheet/group[last()]" position="after">
<group name="cotisations" string="Cotisations">
<field name="liasse_fiscale_id" readonly="1"/>
</group>
</xpath>
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="string">Adhérent</attribute>
</xpath>
<xpath expr="//field[@name='date_invoice']" position="attributes">
<attribute name="string">Date de cotisation</attribute>
</xpath>
<xpath expr="//field[@name='user_id']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//field[@name='team_id']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//field[@name='beneficiary_id']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//field[@name='lf_note_ref_facture']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//field[@name='team_id']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//sheet/h1/div/label[1]" position="attributes">
<attribute name="string">Cotisation en brouillon</attribute>
</xpath>
</field>
</record>
<!-- Tree -->
<record id="invoice_tree_scop_inherited" model="ir.ui.view">
<field name="name">account.invoice.tree.scop.inherited</field>
<field name="model">account.invoice</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.invoice_tree_with_onboarding"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="string">Adhérent</attribute>
</xpath>
<xpath expr="//field[@name='partner_id']" position="after">
<field name="type_contribution_id"/>
</xpath>
<xpath expr="//field[@name='date_invoice']" position="attributes">
<attribute name="string">Date de cotisation</attribute>
</xpath>
<xpath expr="//field[@name='user_id']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//field[@name='company_id']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//field[@name='origin']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//field[@name='state']" position="after">
<field name="is_sdd" invisible="1"/>
</xpath>
</field>
</record>
<record id="invoice_scop_contribution_refund_tree" model="ir.ui.view">
<field name="name">account.invoice.tree.scop.contribution</field>
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<tree create="0" edit="0" delete="0">
<field name="name"/>
<field name="date_invoice" string="Date d'émission"/>
<field name="number"/>
<field name="amount_total_signed" widget="monetary"/>
<field name="state" invisible="1"/>
</tree>
</field>
</record>
<!-- Search -->
<record id="invoice_search_scop_inherited" model="ir.ui.view">
<field name="name">account.invoice.search.scop.inherited</field>
<field name="model">account.invoice</field>
<field name="priority" eval="25"/>
<field name="arch" type="xml">
<search string="Search Invoice">
<filter name="draft" string="Brouillon" domain="[('state','=','draft')]"/>
<filter name="unpaid" string="Ouvert" domain="[('state', '=', 'open')]"/>
<!-- <filter name="in_payment" string="En Paiement" domain="[('state', '=', 'in_payment')]"/>-->
<filter name="paid" string="Payé" domain="[('state', '=', 'paid')]"/>
<filter name="late" string="Retard" domain="['&amp;', ('date_due', '&lt;', time.strftime('%%Y-%%m-%%d')), ('state', '=', 'open')]" help="Overdue invoices, maturity date passed"/>
<separator/>
<filter name="cotiz_equal_zero" domain="[('amount_total','=',0)]" string="Cotisation(s) égale(s) à 0"/>
<separator/>
<filter name="4_quarter" string="Sur 4 trimestres" domain="[('nb_quarter', '=', '4')]"/>
<filter name="3_quarter" string="Sur 3 trimestres" domain="[('nb_quarter', '=', '3')]"/>
<filter name="2_quarter" string="Sur 2 trimestres" domain="[('nb_quarter', '=', '2')]"/>
<filter name="1_quarter" string="Sur 1 trimestre" domain="[('nb_quarter', '=', '1')]"/>
<separator/>
<filter name="is_sdd" string="Cotisation au prélèvement" domain="[('is_sdd', '=', True)]"/>
<field name="partner_id" operator="child_of"/>
<field name="number" string="Invoice" context="{'active_test': False}" filter_domain="['|','|','|', ('number','ilike',self), ('origin','ilike',self), ('reference', 'ilike', self), ('partner_id', 'child_of', self)]"/>
<!-- <field name="user_id" string="Salesperson" domain="[('share','=', False)]"/>-->
<field name="date" string="Period"/>
<group expand="0" string="Group By">
<filter name="group_by_partner_id" string="Adhérent" context="{'group_by':'commercial_partner_id'}"/>
<filter name="status" string="Statut" context="{'group_by':'state'}"/>
<separator/>
<filter string="Date de Facturation" name="invoicedate" context="{'group_by':'date_invoice'}"/>
<filter string="Date d'échéance" name="duedate" context="{'group_by':'date_due'}"/>
</group>
</search>
</field>
</record>
<!-- Action -->
<record id="account.action_invoice_tree1" model="ir.actions.act_window">
<field name="domain" eval="[('type','in', ['out_invoice']), ('is_contribution', '!=', True)]"/>
</record>
<!-- MENUS -->
<menuitem id="menu_scop_cotisation"
name="Cotisations"
parent="account.menu_finance"
sequence="2"/>
</data>
</odoo>
\ No newline at end of file
......@@ -3,25 +3,266 @@
<!-- Copyright 2020 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<data>
<!-- **************************************
Invoices changes for contribution
************************************** -->
<!-- Form -->
<record id="account_move_form_scop_inherited" model="ir.ui.view">
<field name="name">account.move.form.scop.inherited</field>
<field name="model">account.move</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
<xpath expr="//div[@name='journal_div']" position="after">
<field
name="partner_ur_id"
readonly="1"
groups="base.group_no_one"
/>
<field
name="is_contribution"
readonly="1"
groups="base.group_no_one"
/>
<field name="year" readonly="1" />
</xpath>
<xpath expr="//sheet/group[last()]" position="after">
<group name="cotisations" string="Cotisations">
<field name="liasse_fiscale_id" readonly="1" />
</group>
</xpath>
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="string">Adhérent</attribute>
</xpath>
<xpath expr="//field[@name='partner_id']" position="after">
<field name="partner_member_number" readonly="1" />
</xpath>
<xpath expr="//field[@name='invoice_date']" position="attributes">
<attribute name="string">Date de cotisation</attribute>
</xpath>
<xpath expr="//field[@name='user_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='team_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='beneficiary_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='team_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
<!-- Tree -->
<record id="account_move_tree_scop_inherited" model="ir.ui.view">
<field name="name">account.move.tree.scop.inherited</field>
<field name="model">account.move</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.view_invoice_tree" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='invoice_partner_display_name']"
position="before"
>
<field name="partner_member_number" readonly="1" />
<field
name="invoice_partner_display_name"
string="Adhérent"
optional="show"
/>
<field
name="invoice_date"
string="Date de cotisation"
optional="show"
/>
</xpath>
<xpath expr="//field[@name='invoice_origin']" position="after">
<field name="type_contribution_id" optional="hide" />
<field name="year" optional="hide" />
</xpath>
<xpath expr="//field[@name='activity_ids']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='company_id']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='invoice_origin']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//field[@name='state']" position="after">
<field name="is_sdd" invisible="1" />
</xpath>
</field>
</record>
<record id="account_move_scop_contribution_refund_tree" model="ir.ui.view">
<field name="name">account.invoice.tree.scop.contribution</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<tree create="0" edit="0" delete="0">
<field name="name" />
<field name="invoice_date" string="Date d'émission" />
<field name="ref" />
<field name="amount_total_signed" widget="monetary" />
<field name="state" invisible="1" />
</tree>
</field>
</record>
<!-- Search -->
<record id="account_move_search_scop_inherited" model="ir.ui.view">
<field name="name">account.move.search.scop.inherited</field>
<field name="model">account.move</field>
<field name="priority" eval="25" />
<field name="arch" type="xml">
<search string="Search Invoice">
<filter
name="draft"
string="Brouillon"
domain="[('state','=','draft'), ('move_type','in', ['out_invoice', 'out_refund'])]"
/>
<filter
name="unpaid"
string="Non payées"
domain="[('payment_state', 'in', ['not_paid', 'in_payment', 'partial']), ('state', '=', 'posted')]"
/>
<filter
name="paid"
string="Payé"
domain="[('payment_state', '=', 'paid'), ('state', '=', 'posted')]"
/>
<filter
name="late"
string="Retard"
domain="['&amp;', ('invoice_date_due', '&lt;', time.strftime('%Y-%m-%d')), ('state', '=', 'posted'), ('payment_state', 'in', ('not_paid', 'partial'))]"
/>
<separator />
<filter
name="cotiz_equal_zero"
domain="[('amount_total','=',0)]"
string="Cotisation(s) égale(s) à 0"
/>
<separator />
<filter
name="is_sdd"
string="Cotisation au prélèvement"
domain="[('is_sdd', '=', True)]"
/>
<field name="partner_id" operator="child_of" />
<field
name="name"
string="Invoice"
context="{'active_test': False}"
filter_domain="['|','|','|', ('name','ilike',self), ('invoice_origin','ilike',self), ('reference', 'ilike', self), ('partner_id', 'child_of', self)]"
/>
<field name="date" string="Period" />
<group expand="0" string="Group By">
<filter
name="group_by_partner_id"
string="Adhérent"
context="{'group_by':'commercial_partner_id'}"
/>
<filter
name="status"
string="Statut"
context="{'group_by':'state'}"
/>
<separator />
<filter
string="Date de Facturation"
name="invoicedate"
context="{'group_by':'invoice_date'}"
/>
<filter
string="Date d'échéance"
name="duedate"
context="{'group_by':'invoice_date_due'}"
/>
</group>
</search>
</field>
</record>
<!-- Action -->
<record id="account.action_move_out_invoice_type" model="ir.actions.act_window">
<field
name="domain"
eval="[('move_type','=', 'out_invoice'), ('is_contribution', '!=', True)]"
/>
</record>
<record id="account.action_move_out_refund_type" model="ir.actions.act_window">
<field
name="domain"
eval="[('move_type','=', 'out_refund'), ('is_contribution', '!=', True)]"
/>
</record>
<!-- MENUS -->
<menuitem
id="menu_scop_cotisation"
name="Cotisations"
parent="account.menu_finance"
sequence="2"
/>
<!-- **************************************
Move changes for SDD rejected payments
************************************** -->
<!-- Tree View -->
<record id="scop_account_move_tree" model="ir.ui.view">
<field name="name">scop.account.move.tree</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" string="Pièces comptables" create="0" edit="0">
<tree
decoration-info="state == 'draft'"
string="Pièces comptables"
create="0"
edit="0"
>
<field name="date" />
<field name="name" />
<field name="partner_id"/>
<field name="commercial_partner_id" />
<field name="ref" />
<field name="journal_id" />
<field name="amount" sum="Total Amount"/>
<field name="reverse_date"/>
<field name="reverse_entry_id"/>
<button name="%(account.action_view_account_move_reversal)d" type="action"
string="Rejeter (extourne)" class="btn-outline-danger btn-sm"
attrs="{'invisible': [('reverse_entry_id', '!=', False), ('state', '=', 'posted')]}"/>
<field name="state"/>
<field name="amount_total" sum="Total Amount" />
<field name="reversed_entry_id" />
<field name="reversal_move_id" widget="many2many_tags" />
<field name="payment_reference" optional="hide" />
<button
name="%(account.action_view_account_move_reversal)d"
type="action"
string="Rejeter (extourne)"
class="btn-outline-danger btn-sm"
attrs="{'invisible': [
'|',
'&amp;', ('reversal_move_id', '=', []), ('reversed_entry_id', '!=', False),
'&amp;', ('reversal_move_id', '!=', []), ('reversed_entry_id', '=', False),
]}"
/>
<field
name="state"
widget="badge"
decoration-success="state == 'posted'"
decoration-info="state == 'draft'"
optional="show"
/>
<field
name="payment_state"
widget="badge"
decoration-danger="payment_state == 'not_paid'"
decoration-warning="payment_state in ('partial', 'in_payment')"
decoration-success="payment_state in ('paid', 'reversed')"
attrs="{'invisible': [('payment_state', 'in', ('invoicing_legacy'))]}"
optional="hide"
/>
<field name="partner_id" optional="hide" />
<field name="currency_id" invisible="1" />
</tree>
</field>
......@@ -33,11 +274,19 @@
<field name="model">account.move</field>
<field name="arch" type="xml">
<search string="Pièces comptables">
<field name="partner_id" string="Adhérent"/>
<field name="commercial_partner_id" string="Adhérent" />
<field name="ref" string="Référence" />
<field name="name" />
<filter name="rejected" domain="[('reverse_entry_id', '!=', False)]" string="Rejetés"/>
<filter name="not_rejected" domain="[('reverse_entry_id', '=', False)]" string="En cours"/>
<filter
name="rejected"
domain="[('reversed_entry_id', '!=', False)]"
string="Rejetés"
/>
<filter
name="not_rejected"
domain="[('reversed_entry_id', '=', False)]"
string="En cours"
/>
</search>
</field>
</record>
......
......@@ -9,16 +9,29 @@
<field name="model">account.payment.line</field>
<field name="arch" type="xml">
<tree string="Payment Lines" editable="top" create="0">
<field name="company_id" invisible="1" />
<field name="partner_id" />
<field name="communication" />
<field name="partner_bank_id" domain="[('partner_id', '=', partner_id)]" options="{'no_create': 1}"/>
<field name="mandate_id" domain="[('partner_id', '=', partner_id)]" options="{'no_create': 1}"/>
<field
name="partner_bank_id"
domain="[('partner_id', '=', partner_id)]"
options="{'no_create': 1}"
/>
<field
name="mandate_id"
domain="[('partner_id', '=', partner_id)]"
options="{'no_create': 1}"
/>
<field name="move_line_id" invisible="1" />
<field name="ml_maturity_date" />
<field name="date" readonly="1" />
<field name="amount_currency" string="Montant" />
<field name="name" />
<field name="amount_company_currency" sum="Total in Company Currency" invisible="1"/>
<field
name="amount_company_currency"
sum="Total in Company Currency"
invisible="1"
/>
<field name="payment_type" invisible="1" />
</tree>
</field>
......
......@@ -7,49 +7,157 @@
<record id="account_payment_order_form" model="ir.ui.view">
<field name="name">account.payment.order.form</field>
<field name="model">account.payment.order</field>
<field name="inherit_id" ref="account_payment_order.account_payment_order_form"/>
<field
name="inherit_id"
ref="account_payment_order.account_payment_order_form"
/>
<field name="priority">100</field>
<field name="arch" type="xml">
<!-- Header and buttons -->
<xpath expr="//button[@name='action_cancel']" position="after">
<button
name="action_send_email"
type="object"
string="Envoyer un email aux coopératives"
class="btn-info"
groups="account.group_account_manager"
attrs="{'invisible': ['|', '|', ('state', 'not in', ('generated', 'uploaded')), ('email_sent', '=', True), ('company_id', '!=', %(base.main_company)d)]}"
confirm="Valider l'envoi des emails ?"
/>
<button
name="action_send_email"
type="object"
string="Renvoyer un email aux coopératives"
groups="account.group_account_manager"
attrs="{'invisible': ['|', '|', ('state', 'not in', ('generated', 'uploaded')), ('email_sent', '!=', True), ('company_id', '!=', %(base.main_company)d)]}"
confirm="Valider l'envoi des emails ?"
/>
</xpath>
<xpath expr="//button[@name='action_cancel']" position="attributes">
<attribute name="groups">base.group_system,cgscop_partner.group_cg_administrator</attribute>
<attribute name="confirm">Confirmer l'annulation de l'ordre de prélèvement ?</attribute>
<attribute
name="groups"
>base.group_system,cgscop_partner.group_cg_administrator</attribute>
<attribute
name="confirm"
>Confirmer l'annulation de l'ordre de prélèvement ?</attribute>
</xpath>
<xpath expr="//button[@name='action_done_cancel']" position="attributes">
<attribute name="groups">base.group_system,cgscop_partner.group_cg_administrator</attribute>
<attribute name="confirm">Confirmer l'annulation de l'ordre de prélèvement ?</attribute>
<xpath
expr="//button[@name='action_uploaded_cancel']"
position="attributes"
>
<attribute
name="groups"
>base.group_system,cgscop_partner.group_cg_administrator</attribute>
<attribute
name="confirm"
>Confirmer l'annulation de l'ordre de prélèvement ?</attribute>
</xpath>
<xpath expr="//field[@name='bank_line_count']" position="after">
<!-- Sheet -->
<!-- Button box -->
<xpath expr="//div[@name='button_box']" position="inside">
<button
class="oe_stat_button"
name="action_show_emails"
type="object"
icon="fa-envelope-o"
>
<field string="Emails" name="email_count" widget="statinfo" />
</button>
</xpath>
<!-- Alert -->
<xpath expr="//div[hasclass('oe_title')]" position="before">
<field name="email_sent" invisible="1" />
<div
class="alert alert-warning"
role="alert"
attrs="{'invisible': [('email_sent', '!=', True)]}"
>
Un email a été envoyé aux coopératives le
<field name="email_datetime" readonly="1" />
</div>
</xpath>
<!-- Sheet Buttons -->
<xpath expr="//field[@name='payment_count']" position="after">
<field name="payment_line_amount" />
<field name="bank_line_amount" />
<button name="view_payment_line"
<button
name="view_payment_line"
type="object"
string="Modifier les lignes de paiement"
attrs="{'invisible': [('state', '!=', 'draft')]}"/>
attrs="{'invisible': [('state', '!=', 'draft')]}"
/>
</xpath>
<xpath expr="//field[@name='description']" position="after">
<button name="view_account_move"
<button
name="view_account_move"
type="object"
string="Gérer les rejets de prélèvement"
class="btn-info"
attrs="{'invisible': [('state', 'not in', ('uploaded', 'done'))]}"/>
attrs="{'invisible': [('state', 'not in', ('uploaded', 'done'))]}"
/>
</xpath>
<!-- Boutons de vérification IBAN et mandats -->
<xpath expr="//notebook" position="before">
<field name="mandate_validity" invisible="1" />
<button
name="view_wrong_iban"
type="object"
string="Voir les IBAN à corriger"
class="btn-danger"
attrs="{'invisible': [('sepa', '=', True)]}"
style="margin-right: 10px;"
/>
<button
name="view_wrong_mandate"
type="object"
string="Voir les Mandats non valides"
class="btn-danger"
attrs="{'invisible': [('mandate_validity', '=', True)]}"
/>
</xpath>
<!-- Affichage des fichers XML -->
<xpath expr="//notebook" position="inside">
<page name="attachments" string="Fichiers de prélèvements">
<field name="attachment_ids">
<tree>
<field name="attachment_ids" readonly="1" mode="tree">
<tree create="0" edit="0">
<field name="create_date" />
<field name="name" />
<field name="type" />
<field name="datas" filename="datas_fname"/>
<field name="datas" filename="name" widget="binary" />
<field name="create_uid" />
<!-- <button-->
<!-- name="download_sdd_file"-->
<!-- type="object"-->
<!-- string="Télécharger le fichier"-->
<!-- class="btn-sm btn-o-info"-->
<!-- />-->
</tree>
<form>
<h1><field name="name" /></h1>
<group>
<group>
<field name="datas" filename="datas_fname" attrs="{'invisible':[('type','=','url')]}" string="Télécharger le fichier"/>
<field name="datas_fname" invisible="1" attrs="{'invisible':[('type','=','url')]}" class="oe_inline oe_right"/>
<field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
<field name="mimetype" groups="base.group_no_one"/>
<field
name="datas"
filename="name"
attrs="{'invisible':[('type','=','url')]}"
string="Télécharger le fichier"
/>
<field
name="name"
invisible="1"
attrs="{'invisible':[('type','=','url')]}"
class="oe_inline oe_right"
/>
<field
name="url"
widget="url"
attrs="{'invisible':[('type','=','binary')]}"
/>
<field
name="mimetype"
groups="base.group_no_one"
/>
<field name="type" />
</group>
<group>
......
......@@ -8,7 +8,10 @@
<field name="priority" eval="25" />
<field name="inherit_id" ref="account.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[@id='setup']" position="after">
<xpath
expr="//div[@name='fiscal_localization_setting_container']"
position="after"
>
<h2>Cotisations</h2>
<div class="row mt16 o_settings_container" name="contribution">
<div class="col-xs-12 col-md-6 o_setting_box">
......@@ -27,7 +30,10 @@
<div class="text-muted">
Définit le journal des cotisations
</div>
<field name="contribution_journal_id" options="{'no_open': True, 'no_create': True}"/>
<field
name="contribution_journal_id"
options="{'no_open': True, 'no_create': True}"
/>
</div>
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
......@@ -35,7 +41,10 @@
<div class="text-muted">
Etiquette associée aux contacts cotisations
</div>
<field name="tag_cotiz_id" options="{'no_open': True, 'no_create': True}"/>
<field
name="tag_cotiz_id"
options="{'no_open': True, 'no_create': True}"
/>
</div>
</div>
</div>
......
......@@ -10,18 +10,26 @@
<field name="inherit_id" ref="cgscop_partner.scop_contact_view_form" />
<field name="arch" type="xml">
<xpath expr="//page[@name='scop_membership']" position="after">
<page name='scop_contribution' string="Cotisations" attrs="{'invisible': ['|', ('is_cooperative', '!=', True), ('project_status', '!=', '6_suivi')]}">
<page
name='scop_contribution'
string="Cotisations"
attrs="{'invisible': ['|', ('is_cooperative', '!=', True), ('project_status', 'not in', ['4_suivi', '6_decede'])]}"
>
<notebook>
<page name="contribution" string="Appels de Cotisations">
<field name="contribution_report_ids" mode="tree,form">
<tree create="false" edit="false" delete="false" default_order="year desc">
<tree
create="false"
edit="false"
delete="false"
default_order="year desc"
>
<field name="year" />
<field name="type_contribution_id" />
<field name='partner_id' />
<field name='amount_called' />
<field name='amount_paid' />
<field name='amount_due' />
<field name='is_loss' style="text-align: center;"/>
</tree>
</field>
</page>
......
<?xml version="1.0"?>
<!-- Copyright 2021 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<data>
<!-- TREE VIEW -->
<record model="ir.ui.view" id="view_scop_cotisation_task_tree">
<field name="name">scop.cotisation.task.tree</field>
<field name="model">scop.cotisation.task</field>
<field name="arch" type="xml">
<tree create="false" string="Taches création cotisations" default_order="create_date desc">
<field name="create_date"/>
<field name="year"/>
<field name='status'/>
<field name='cotiz_created'/>
<field name='cotiz_to_create'/>
<field name='is_error'/>
<field name="message"/>
</tree>
</field>
</record>
<!-- ACTIONS VIEWS-->
<record model="ir.actions.act_window" id="action_scop_cotisation_task">
<field name="name">Taches cotisation</field>
<field name="res_model">scop.cotisation.task</field>
<field name="view_mode">tree,form</field>
</record>
<!-- MENU -->
<menuitem id="menu_scop_cotisation_list_task"
parent="account.menu_finance_configuration"
name="Taches création cotisations"
sequence="50"
action="action_scop_cotisation_task"/>
</data>
</odoo>
\ No newline at end of file