port sethy to 17.0
This commit is contained in:
parent
81624ea26c
commit
a09152207b
13 changed files with 589 additions and 0 deletions
2
bemade_sethy_configuration/__init__.py
Normal file
2
bemade_sethy_configuration/__init__.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from . import models
|
||||
54
bemade_sethy_configuration/__manifest__.py
Normal file
54
bemade_sethy_configuration/__manifest__.py
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': 'Bemade Sethy',
|
||||
'version': '1.0',
|
||||
'category': 'Specific Module Category', # Specify your module's category here
|
||||
'summary': "This module is developed by Bemade to instantiate the Sethy's Odoo",
|
||||
'author': 'Bemade',
|
||||
'website': 'https://bemade.org',
|
||||
'email': 'it@bemade.org',
|
||||
'license': 'GPL-3',
|
||||
'depends': [
|
||||
# List of module dependencies
|
||||
'base',
|
||||
'contacts',
|
||||
'crm',
|
||||
'document_knowledge',
|
||||
'document_page',
|
||||
'document_page_approval',
|
||||
'attachment_indexation',
|
||||
'l10n_ca',
|
||||
'membership_variable_period',
|
||||
'membership_delegated_partner',
|
||||
'partner_multi_relation',
|
||||
'sale_management'
|
||||
],
|
||||
'data': [
|
||||
# Reference to XML, CSV, and other data files
|
||||
'data/membership_category_data.xml',
|
||||
'data/product_template_data.xml',
|
||||
'data/partner_category_data.xml',
|
||||
'data/partner_relation_type_data.xml',
|
||||
'data/company_data.xml',
|
||||
'views/res_partner_relation_views.xml',
|
||||
# 'views/membership_membership_line.xml',
|
||||
'views/res_partner_views.xml',
|
||||
|
||||
],
|
||||
'demo': [
|
||||
# Reference to demo data files
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'application': False, # Set to True if the module is an app
|
||||
'description': """
|
||||
Main module for Fondation Séthy
|
||||
==================================
|
||||
This module installs base components and will also set up default values according to the Fondation Séthy.
|
||||
|
||||
This will allow us to put all the customization here and add other modules from Oca or our repos if needed.
|
||||
|
||||
Only code specific to Fondation Sethy resides in this module, the reusable stuff should be put in other small dedicated modules elsewhere
|
||||
""",
|
||||
}
|
||||
20
bemade_sethy_configuration/data/company_data.xml
Normal file
20
bemade_sethy_configuration/data/company_data.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1"> <!-- noupdate="1" means the data won't be updated when the module is upgraded -->
|
||||
<!-- Assuming 'base.main_company' is the external ID for the main company -->
|
||||
<record id="base.main_company" model="res.company">
|
||||
<field name="name">Fondation Séthy</field>
|
||||
<field name="website">https://fondationsethy.org</field>
|
||||
<field name="email">info@fondationsethy.org</field>
|
||||
<field name="street">164, rue Cowie</field>
|
||||
<field name="street2">local 335</field>
|
||||
<field name="city">Granby</field>
|
||||
<field name="state_id" ref="base.state_ca_qc"/>
|
||||
<field name="zip">J2G 3V3</field>
|
||||
<field name="country_id" ref="base.ca"/>
|
||||
<field name="phone">450 994-3173</field>
|
||||
<field name="account_sale_tax_id" ref="l10n_ca.1_gstqst_sale_en"/>
|
||||
<field name="account_purchase_tax_id" ref="l10n_ca.1_gstqst_purc_en"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
11
bemade_sethy_configuration/data/membership_category_data.xml
Normal file
11
bemade_sethy_configuration/data/membership_category_data.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1"> <!-- noupdate="1" means the data won't be updated when the module is upgraded -->
|
||||
<record id="membership_category_perpetual" model="membership.membership_category">
|
||||
<field name="name">Perpetual Membership</field>
|
||||
</record>
|
||||
<record id="membership_extension.membership_category_member" model="membership.membership_category">
|
||||
<field name="name">Annual Membership</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
13
bemade_sethy_configuration/data/partner_category_data.xml
Normal file
13
bemade_sethy_configuration/data/partner_category_data.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1"> <!-- noupdate="1" means the data won't be updated when the module is upgraded -->
|
||||
<record id="partner_tag_property" model="res.partner.category">
|
||||
<field name="name">Property</field>
|
||||
<field name="color">7</field>
|
||||
</record>
|
||||
<record id="partner_tag_owner" model="res.partner.category">
|
||||
<field name="name">Owner</field>
|
||||
<field name="color">4</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1"> <!-- noupdate="1" means the data won't be updated when the module is upgraded -->
|
||||
<record id="partner_relation_property" model="res.partner.relation.type">
|
||||
<field name="name">Owner</field>
|
||||
<field name="name_inverse">Property</field>
|
||||
<field name="contact_type_right">c</field>
|
||||
<field name="partner_category_right" ref="bemade_sethy_configuration.partner_tag_property"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
35
bemade_sethy_configuration/data/product_template_data.xml
Normal file
35
bemade_sethy_configuration/data/product_template_data.xml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<data noupdate="1"> <!-- noupdate="1" means the data won't be updated when the module is upgraded -->
|
||||
|
||||
<record id="product_membership_perpetual" model="product.template">
|
||||
<field name="membership_category_id" ref="membership_category_perpetual"/>
|
||||
<field name="name">Perpetual Membership</field>
|
||||
<field name="membership" eval="True" />
|
||||
<field name="type">service</field>
|
||||
<field name="membership_date_from">2000-01-01</field>
|
||||
<field name="membership_date_to">2100-01-01</field>
|
||||
<field name="list_price">225.0</field>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">MBRAV</field>
|
||||
</record>
|
||||
|
||||
<record id="product_membership_annual" model="product.template">
|
||||
<field name="membership_category_id" ref="membership_extension.membership_category_member"/>
|
||||
<field name="name">Annual Membership</field>
|
||||
<field name="membership" eval="True" />
|
||||
<field name="type">service</field>
|
||||
<field name="list_price">20.0</field>
|
||||
<field name="uom_id" ref="uom.product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="uom.product_uom_unit"/>
|
||||
<field name="default_code">MBRAN</field>
|
||||
<field name="membership_type">variable</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
|
||||
</odoo>
|
||||
1
bemade_sethy_configuration/models/__init__.py
Normal file
1
bemade_sethy_configuration/models/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from . import res_partner
|
||||
135
bemade_sethy_configuration/models/res_partner.py
Normal file
135
bemade_sethy_configuration/models/res_partner.py
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.addons.website.models import ir_http
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
surface = fields.Float(string='Surface (ha)') # terrain
|
||||
lot_number = fields.Text(string='Lot Number') # terrain
|
||||
|
||||
ref_project = fields.Text(string='Project No') # proprio
|
||||
intent_signing = fields.Boolean(string='Intent to sign') # proprio
|
||||
cyberimpact = fields.Boolean(string='Cyberimpact') # proprio
|
||||
specification_date = fields.Date(string='Specification date') # proprio
|
||||
crm_stage_activity = fields.Text(string='Activity Stage') # proprio
|
||||
|
||||
property_count = fields.Integer(string='Property count', compute='_compute_property_count', store=True)
|
||||
is_owner = fields.Boolean(string='Is Owner', compute='_compute_property_count', store=True)
|
||||
|
||||
sethy_first_date = fields.Date(string='First membership date') # member
|
||||
sethy_last_date = fields.Date(string='Last membership date') # member
|
||||
sethy_renew_date = fields.Date(string='Next renew date date') # member
|
||||
sethy_certification_date = fields.Date(string='Certification date date') # member
|
||||
sethy_payment_type = fields.Text(string='Payment Type') # member
|
||||
sethy_amount = fields.Float(string='Payment amount') # Member
|
||||
|
||||
is_property = fields.Boolean(
|
||||
string='Is Property',
|
||||
default=False
|
||||
) # True if property, False if not
|
||||
|
||||
interest_level = fields.Selection(
|
||||
selection=[
|
||||
('1', 'None'),
|
||||
('2', 'Low'),
|
||||
('3', 'Average'),
|
||||
('4', 'High')],
|
||||
string='Interest Level') # proprio
|
||||
|
||||
company_use = fields.Text(string='Company related') # proprio
|
||||
|
||||
relation_owner_ids = fields.One2many(
|
||||
"res.partner.relation.all",
|
||||
compute="_compute_owner_ids",
|
||||
string="Owner ids"
|
||||
)
|
||||
|
||||
relation_property_ids = fields.One2many(
|
||||
"res.partner.relation.all",
|
||||
compute="_compute_property_ids",
|
||||
string="Property ids"
|
||||
)
|
||||
|
||||
@api.depends('relation_all_ids')
|
||||
def _compute_owner_ids(self):
|
||||
for record in self:
|
||||
record.relation_owner_ids = record.relation_all_ids.filtered(
|
||||
lambda line: (
|
||||
line.type_id.name == 'Owner' and not line.is_inverse)
|
||||
)
|
||||
|
||||
@api.depends('relation_all_ids')
|
||||
def _compute_property_ids(self):
|
||||
for record in self:
|
||||
record.relation_property_ids = record.relation_all_ids.filtered(
|
||||
lambda line: (
|
||||
line.type_id.name == 'Owner' and line.is_inverse)
|
||||
)
|
||||
|
||||
@api.onchange('is_property')
|
||||
def _onchange_is_property(self):
|
||||
""" Set is_company to True when is_property is set to True. """
|
||||
if self.is_property:
|
||||
self.is_company = True
|
||||
|
||||
@api.onchange('is_company')
|
||||
def _onchange_is_company(self):
|
||||
""" Set is_property to False when is_company is set to False. """
|
||||
if not self.is_company:
|
||||
self.is_property = False
|
||||
|
||||
@api.onchange('lot_number')
|
||||
def _onchange_lot_number(self):
|
||||
for lot in self:
|
||||
if lot.lot_number:
|
||||
lot.name = "Lot " + str(lot.lot_number)
|
||||
|
||||
@api.depends('relation_property_ids')
|
||||
def _compute_property_count(self):
|
||||
for record in self:
|
||||
record.property_count = len(record.relation_property_ids)
|
||||
record.is_owner = record.property_count > 0
|
||||
|
||||
def write(self, vals):
|
||||
property_tag = self.env.ref('bemade_sethy_configuration.partner_tag_property', raise_if_not_found=False)
|
||||
owner_tag = self.env.ref('bemade_sethy_configuration.partner_tag_owner', raise_if_not_found=False)
|
||||
if 'is_property' in vals:
|
||||
if vals['is_property'] and property_tag:
|
||||
vals['category_id'] = [(4, property_tag.id)]
|
||||
elif not vals['is_property'] and property_tag:
|
||||
vals['category_id'] = [(3, property_tag.id)]
|
||||
if len(self.relation_owner_ids) > 0:
|
||||
vals['category_id'] = [(4, owner_tag.id)]
|
||||
else:
|
||||
vals['category_id'] = [(3, owner_tag.id)]
|
||||
return super(ResPartner, self).write(vals)
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
# Get the property tag reference outside the loop to avoid repeated searches.
|
||||
property_tag = self.env.ref('bemade_sethy_configuration.partner_tag_property', raise_if_not_found=False)
|
||||
# Iterate over each set of values in the list.
|
||||
for vals in vals_list:
|
||||
# Check if 'is_property' is in the values of the current record.
|
||||
if 'is_property' in vals:
|
||||
if vals['is_property'] and property_tag:
|
||||
# Add the tag to category_id if is_property is True.
|
||||
vals['category_id'] = [(4, property_tag.id)]
|
||||
elif not vals['is_property'] and property_tag:
|
||||
# Remove the tag from category_id if is_property is False.
|
||||
vals['category_id'] = [(3, property_tag.id)]
|
||||
# Call super and pass the modified vals_list.
|
||||
return super(ResPartner, self).create(vals_list)
|
||||
|
||||
@api.onchange('is_property')
|
||||
def _inverse_is_property(self):
|
||||
property_tag = self.env.ref('bemade_sethy_configuration.partner_tag_property', raise_if_not_found=False)
|
||||
for partner in self:
|
||||
if partner.is_property:
|
||||
partner.category_id |= property_tag
|
||||
else:
|
||||
partner.category_id -= property_tag
|
||||
|
||||
BIN
bemade_sethy_configuration/static/icon.png
Normal file
BIN
bemade_sethy_configuration/static/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
|
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<!-- <record id="tree_res_partner_relation" model="ir.ui.view">-->
|
||||
<!-- <field name="model">membership.membership_line</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <tree editable="top">-->
|
||||
<!-- <field-->
|
||||
<!-- name="partner"-->
|
||||
<!-- required="True"-->
|
||||
<!-- />-->
|
||||
<!-- <field-->
|
||||
<!-- name="date"-->
|
||||
<!-- />-->
|
||||
<!-- <field-->
|
||||
<!-- name="date_from"-->
|
||||
<!-- />-->
|
||||
<!-- <field name="date_to" />-->
|
||||
<!-- <field name="membership_id" />-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<!-- <record id="search_res_partner_relation_all" model="ir.ui.view">-->
|
||||
<!-- <field name="model">res.partner.relation.all</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <search string="Search Relations">-->
|
||||
<!-- <field name="any_partner_id" widget="many2one" />-->
|
||||
<!-- <field name="this_partner_id" />-->
|
||||
<!-- <field name="other_partner_id" />-->
|
||||
<!-- <field name="type_selection_id" />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="left_to_right"-->
|
||||
<!-- string="Left to right"-->
|
||||
<!-- domain="[('is_inverse', '=', False)]"-->
|
||||
<!-- />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="right_to_left"-->
|
||||
<!-- string="Right to left"-->
|
||||
<!-- domain="[('is_inverse', '=', True)]"-->
|
||||
<!-- />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="include_part_records"-->
|
||||
<!-- string="Include past records"-->
|
||||
<!-- context="{'active_test': False}"-->
|
||||
<!-- />-->
|
||||
<!-- <group expand="0" string="Group By">-->
|
||||
<!-- <filter-->
|
||||
<!-- name="group_by_this_partner_id"-->
|
||||
<!-- string="One Partner"-->
|
||||
<!-- context="{'group_by': 'this_partner_id'}"-->
|
||||
<!-- />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="group_by_type_selection_id"-->
|
||||
<!-- string="Relationship Type"-->
|
||||
<!-- context="{'group_by': 'type_selection_id'}"-->
|
||||
<!-- />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="group_by_other_partner_id"-->
|
||||
<!-- string="Other Partner"-->
|
||||
<!-- context="{'group_by': 'other_partner_id'}"-->
|
||||
<!-- />-->
|
||||
<!-- </group>-->
|
||||
<!-- </search>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<record id="action_membership_membership_line" model="ir.actions.act_window">
|
||||
<field name="name">Membership line</field>
|
||||
<field name="res_model">membership.membership_line</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<!-- <field name="view_id" ref="tree_res_partner_relation" />-->
|
||||
<!-- <field name="search_view_id" ref="search_res_partner_relation_all" />-->
|
||||
<!-- <field name="context">{'active_test': 0}</field>-->
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Record and track your partners'membership
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_membership_membership_line"
|
||||
sequence="3"
|
||||
parent="membership.menu_association"
|
||||
action="action_membership_membership_line"
|
||||
/>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="tree_res_partner_relation" model="ir.ui.view">
|
||||
<field name="model">res.partner.relation</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="top">
|
||||
<field
|
||||
name="left_partner_id"
|
||||
required="True"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="type_id"
|
||||
required="True"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field
|
||||
name="right_partner_id"
|
||||
required="True"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field name="date_start" />
|
||||
<field name="date_end" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- <record id="search_res_partner_relation_all" model="ir.ui.view">-->
|
||||
<!-- <field name="model">res.partner.relation.all</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <search string="Search Relations">-->
|
||||
<!-- <field name="any_partner_id" widget="many2one" />-->
|
||||
<!-- <field name="this_partner_id" />-->
|
||||
<!-- <field name="other_partner_id" />-->
|
||||
<!-- <field name="type_selection_id" />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="left_to_right"-->
|
||||
<!-- string="Left to right"-->
|
||||
<!-- domain="[('is_inverse', '=', False)]"-->
|
||||
<!-- />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="right_to_left"-->
|
||||
<!-- string="Right to left"-->
|
||||
<!-- domain="[('is_inverse', '=', True)]"-->
|
||||
<!-- />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="include_part_records"-->
|
||||
<!-- string="Include past records"-->
|
||||
<!-- context="{'active_test': False}"-->
|
||||
<!-- />-->
|
||||
<!-- <group expand="0" string="Group By">-->
|
||||
<!-- <filter-->
|
||||
<!-- name="group_by_this_partner_id"-->
|
||||
<!-- string="One Partner"-->
|
||||
<!-- context="{'group_by': 'this_partner_id'}"-->
|
||||
<!-- />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="group_by_type_selection_id"-->
|
||||
<!-- string="Relationship Type"-->
|
||||
<!-- context="{'group_by': 'type_selection_id'}"-->
|
||||
<!-- />-->
|
||||
<!-- <filter-->
|
||||
<!-- name="group_by_other_partner_id"-->
|
||||
<!-- string="Other Partner"-->
|
||||
<!-- context="{'group_by': 'other_partner_id'}"-->
|
||||
<!-- />-->
|
||||
<!-- </group>-->
|
||||
<!-- </search>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<record id="action_res_partner_relation_relation" model="ir.actions.act_window">
|
||||
<field name="name">Relations - relation</field>
|
||||
<field name="res_model">res.partner.relation</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="tree_res_partner_relation" />
|
||||
<!-- <field name="search_view_id" ref="search_res_partner_relation_all" />-->
|
||||
<!-- <field name="context">{'active_test': 0}</field>-->
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Record and track your partners' relations. Relations may
|
||||
be linked to other partners with a type either directly
|
||||
or inversely.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_res_partner_relation_relation"
|
||||
sequence="3"
|
||||
parent="partner_multi_relation.menu_res_partner_relation"
|
||||
action="action_res_partner_relation_relation"
|
||||
/>
|
||||
</odoo>
|
||||
130
bemade_sethy_configuration/views/res_partner_views.xml
Normal file
130
bemade_sethy_configuration/views/res_partner_views.xml
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="partner_default_contacts_view_form" model="ir.ui.view">
|
||||
<field name="name">bemade_sethy_configuration.res_partner.defaults.form</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="company_type" position="after">
|
||||
<label for="is_property" string="Property"/>
|
||||
<field name="is_property"/>
|
||||
</field>
|
||||
|
||||
<xpath expr="//field[@name='name' and @id='company']" position="replace">
|
||||
<field id="company" class="text-break" name="name" default_focus="1"
|
||||
placeholder="e.g. Lumber Inc"
|
||||
attrs="{'required' : [('type', '=', 'contact')], 'invisible': ['|', ('is_company','=', False),
|
||||
('is_property','=', True)]}"/>
|
||||
<field id="lot_number" class="text-break" name="lot_number" placeholder="123456789"
|
||||
attrs="{'invisible': [('is_property','=', False)]}"/>
|
||||
</xpath>
|
||||
|
||||
<button name="schedule_meeting" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_property', '=', True)]}</attribute>
|
||||
</button>
|
||||
|
||||
<button name="action_view_opportunity" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_property', '=', True)]}</attribute>
|
||||
</button>
|
||||
|
||||
<button name="action_view_partner_invoices" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_property', '=', True)]}</attribute>
|
||||
</button>
|
||||
|
||||
<button name="%(payment.action_payment_token)d" position="attributes">
|
||||
<attribute name="attrs">{'invisible': ['|', ('payment_token_count', '=', 0), ('is_property', '=', True)]}</attribute>
|
||||
</button>
|
||||
|
||||
<xpath expr="//page[@name='contact_addresses']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_property','=', True)]}</attribute>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//page[@name='sales_purchases']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_property','=', True)]}</attribute>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//page[@name='membership']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_property','=', True)]}</attribute>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//page[@name='accounting']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_property','=', True)]}</attribute>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='function']/ancestor::group[1]" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('is_property','=', True)]}</attribute>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='function']/ancestor::group[1]" position="after">
|
||||
<group attrs="{'invisible': [('is_property','=', False)]}">
|
||||
<field name="surface"/>
|
||||
<field name="category_id" widget="many2many_tags"
|
||||
options="{'color_field': 'color', 'no_create_edit': True}"/>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//page[@name='contact_addresses']" position="after">
|
||||
<page string="Property" name="bemade_sethy_configuration.res_partner.defaults.form">
|
||||
<group string="All Owners" attrs="{'invisible': [['is_property','=',False]]}">
|
||||
<field name="relation_property_ids" string="">
|
||||
<tree editable="top">
|
||||
<field name="this_partner_id" required="True" options="{'no_create': True}"
|
||||
attrs="{}" invisible="1"/>
|
||||
<field name="type_selection_id" required="True" options="{'no_create': True}"
|
||||
invisible="1"/>
|
||||
<field name="other_partner_id" required="True" options="{'no_create': True}"
|
||||
string="Owner"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="active" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group string="All Properties" attrs="{'invisible': [['is_property','=',True]]}">
|
||||
<field name="relation_owner_ids" string="">
|
||||
<tree editable="top">
|
||||
<field name="this_partner_id" required="True"
|
||||
options="{'no_create': True}"
|
||||
attrs="{}" invisible="1"
|
||||
/>
|
||||
<field name="type_selection_id" required="True" options="{'no_create': True}"
|
||||
invisible="1"/>
|
||||
<field name="other_partner_id" required="True" options="{'no_create': True}"
|
||||
string="Property"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="active" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='contact_addresses']" position="after">
|
||||
<page string="Sethy" name="bemade_sethy_configuration.res_partner.page.sethy">
|
||||
<group>
|
||||
<field name="ref_project"/>
|
||||
<field name="intent_signing"/>
|
||||
<field name="cyberimpact"/>
|
||||
<field name="specification_date"/>
|
||||
<field name="crm_stage_activity"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="view_res_partner_filter_inherit" model="ir.ui.view">-->
|
||||
<!-- <field name="name">res.partner.select.inherit</field>-->
|
||||
<!-- <field name="model">res.partner</field>-->
|
||||
<!-- <field name="inherit_id" ref="base.view_res_partner_filter"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <xpath expr="//search" position="inside">-->
|
||||
<!-- <filter string="Owner" domain="[('category_id.name', '=', 'Owner')]" />-->
|
||||
<!-- <filter string="Property" domain="[('category_id.name', '=', 'Property')]" />-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
</odoo>
|
||||
Loading…
Reference in a new issue