diff --git a/README.rst b/README.rst index 158fa65f2cb7375d6f5150733023a62ff8eb3327..c0f2d04d1ff52d94735bc25059a4ca1ddc7bbe9b 100644 --- a/README.rst +++ b/README.rst @@ -3,9 +3,9 @@ :alt: License: AGPL-3 -================================= -Mutuelle des Scop et des Scic - crm -================================= +=================================== +Mutuelle des Scop et des Scic - CRM +=================================== Description =========== diff --git a/__manifest__.py b/__manifest__.py index d3605a38182440bba617abf9d482d267c1ec6577..0310056f282688dbe28da1c465f4c6992f14d7c0 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -1,11 +1,11 @@ { - "name": "Mutuelle des Scop et des Scic - crm", + "name": "Mutuelle des Scop et des Scic - CRM", "summary": "Description du module", "author": "Le Filament", "website": "https://le-filament.com", "version": "18.0.1.0.0", "license": "AGPL-3", - "depends": ["mucs_partner", "crm"], + "depends": ["crm", "mucs_partner"], "data": [ "security/ir.model.access.csv", # datas diff --git a/models/crm.py b/models/crm.py index 1f76f85735308348bbe0182b2ced77aa84d5377b..d34187616240c93e56c0f4f01498b29a2f0161e4 100644 --- a/models/crm.py +++ b/models/crm.py @@ -7,9 +7,12 @@ from odoo import models, fields class Lead(models.Model): _inherit = "crm.lead" - mucs_type = fields.Selection(string="Proposition / Avenant", - selection=[('proposition', 'Proposition'), - ('avenant', 'Avenant')], - required=True) - + mucs_type = fields.Selection( + selection=[ + ('proposition', 'Proposition'), + ('avenant', 'Avenant') + ], + string="Proposition / Avenant", + required=True + ) meeting_ids = fields.One2many(related="partner_id.meeting_ids") diff --git a/views/crm.xml b/views/crm.xml index 0c7bccace184758cc67814c2cf1af9b73dd5ab8e..6f558f4778eb5bd94ecdf46ab8c29cc23ac21805 100644 --- a/views/crm.xml +++ b/views/crm.xml @@ -11,7 +11,7 @@ <field name="arch" type="xml"> <xpath expr="//sheet//h1" position="after"> <group> - <field name="mucs_type"/> + <field name="mucs_type" widget="radio" /> </group> </xpath> <xpath expr="//sheet//label[@for='expected_revenue']/.." @@ -45,9 +45,11 @@ <field name="inherit_id" ref="crm.crm_case_kanban_view_leads"/> <field name="arch" type="xml"> <xpath expr="//kanban//progressbar" position="replace"/> - <xpath expr="//kanban//field[@name='expected_revenue']" - position="attributes"> - <attribute name="invisible">True</attribute> + <xpath + expr="//kanban//field[@name='expected_revenue']" + position="attributes" + > + <attribute name="invisible">1</attribute> </xpath> </field> </record> @@ -58,8 +60,10 @@ <field name="model">crm.lead</field> <field name="inherit_id" ref="crm.crm_case_tree_view_oppor"/> <field name="arch" type="xml"> - <xpath expr="//list//field[@name='expected_revenue']" - position="attributes"> + <xpath + expr="//list//field[@name='expected_revenue']" + position="attributes" + > <attribute name="optional">hide</attribute> </xpath> <xpath expr="//list//field[@name='probability']" @@ -79,15 +83,17 @@ <field name="model">crm.lead</field> <field name="inherit_id" ref="crm.quick_create_opportunity_form"/> <field name="arch" type="xml"> - <xpath expr="//form//field[@name='expected_revenue']" - position="attributes"> - <attribute name="invisible">True</attribute> + <xpath + expr="//form//field[@name='expected_revenue']" + position="attributes" + > + <attribute name="invisible">1</attribute> </xpath> - <xpath expr="//form//field[@name='expected_revenue']" - position="after"> - <group> - <field name="mucs_type"/> - </group> + <xpath + expr="//form//field[@name='name']" + position="after" + > + <field name="mucs_type" widget="radio" /> </xpath> </field> </record>