diff --git a/__manifest__.py b/__manifest__.py index f7d95b0e4617e9db3d949e071f5d7e4cdad0833b..6c2fb3eaa80924518bdf3b657f1d0517f793d036 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -7,13 +7,11 @@ "application": False, "installable": True, "depends": [ - "cgscop_account", "cgscop_adhesion", "cgscop_partner_alfodoo", "cmis_field", ], "data": [ - "report/report_invoice_adhesion.xml", "views/res_partner.xml", "views/scop_adhesion_file.xml", ], diff --git a/models/res_partner.py b/models/res_partner.py index 78047823e055cae8519b6920125fd928ea4ee875..42deea90b606b1e7baff58d20584336cd5c7e37d 100644 --- a/models/res_partner.py +++ b/models/res_partner.py @@ -15,7 +15,6 @@ class ScopAlfrescoAdhesionPartner(models.Model): # ------------------------------------------------------ # Actions # ------------------------------------------------------ - # Email def get_recipients_adhesion(self): """ Get recipients for email adhesion @@ -164,28 +163,6 @@ class ScopAlfrescoAdhesionPartner(models.Model): else: folder_coop = self.partner_cmis_folder - # Create & store Facture d'adhésion - invoice_file = self.env.ref("account.account_invoices")._render_qweb_pdf( - self.invoice_adhesion_id.id - )[0] - invoice_name = "Facture d'Adhésion" - self.push_alfresco_file( - file=invoice_file, - name=invoice_name + ".pdf", - folder=folder_coop, - metadata={ - "cm:title": invoice_name, - "cmis:objectTypeId": "D:crm:document", - "cmis:secondaryObjectTypeIds": [ - "P:crm:organisme", - "P:cm:titled", - ], - "crm:type": "FAD", - "crm:contexte": "STD", - "crm:annee": str(fields.Datetime.now().year), - }, - ) - # Create & store Courrier adhésion report_adhesion = self.env.ref( "cgscop_adhesion.cgscop_adhesion_report" diff --git a/report/report_invoice_adhesion.xml b/report/report_invoice_adhesion.xml deleted file mode 100644 index a90bd1df12494dce41525f651cc79f5b61212601..0000000000000000000000000000000000000000 --- a/report/report_invoice_adhesion.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<odoo> - <data> - - <!-- Template invoice --> - <template - id="scop_report_invoice_adhesion" - inherit_id="account.report_invoice_document" - > - <xpath expr="//t[@t-set='o']" position="after"> - <t t-if="o.journal_id == o.company_id.journal_adhesion_id"> - <t t-set="is_adh" t-value="True" /> - </t> - <t t-else=""> - <t t-set="is_adh" t-value="False" /> - </t> - </xpath> - <xpath expr="//div[hasclass('page')]/h2" position="attributes"> - <attribute name="t-if">not is_adh</attribute> - </xpath> - <xpath expr="//div[hasclass('page')]/h2" position="after"> - <h2 t-if="is_adh"> - <span - t-if="o.move_type == 'out_invoice' and o.state in ('open', 'in_payment', 'paid')" - >Droits d'adhésion</span> - <span - t-if="o.move_type == 'out_invoice' and o.state == 'draft'" - >Brouillon adhésion</span> - <span - t-if="o.move_type == 'out_invoice' and o.state == 'cancel'" - >Annulation adhésion</span> - <span t-field="o.name" /> - </h2> - </xpath> - - </template> - - </data> -</odoo>