Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
afac_membership
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
AFAC
afac_membership
Commits
ec90abdd
Commit
ec90abdd
authored
3 years ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[add] partner member fields & view
parent
5afa2b07
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
models/__init__.py
+1
-1
1 addition, 1 deletion
models/__init__.py
models/membership_line.py
+0
-10
0 additions, 10 deletions
models/membership_line.py
models/res_partner.py
+39
-0
39 additions, 0 deletions
models/res_partner.py
views/res_partner.xml
+33
-0
33 additions, 0 deletions
views/res_partner.xml
with
73 additions
and
11 deletions
models/__init__.py
+
1
−
1
View file @
ec90abdd
# Copyright 2021 Le Filament (<http://www.le-filament.com>)
# Copyright 2021 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from
.
import
membership_li
ne
from
.
import
res_part
ne
r
This diff is collapsed.
Click to expand it.
models/membership_line.py
deleted
100644 → 0
+
0
−
10
View file @
5afa2b07
# Copyright 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
class
MembershipLine
(
models
.
Model
):
_inherit
=
'
membership.membership_line
'
state
=
fields
.
Selection
(
readonly
=
False
,)
This diff is collapsed.
Click to expand it.
models/res_partner.py
0 → 100644
+
39
−
0
View file @
ec90abdd
# Copyright 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
,
api
class
ResPartner
(
models
.
Model
):
_inherit
=
'
res.partner
'
# Company Fields
membership_number
=
fields
.
Integer
(
string
=
'
N° Adhérent
'
)
# ------------------------------------------------------
# SQL Constraints
# ------------------------------------------------------
# ------------------------------------------------------
# Default methods
# ------------------------------------------------------
# ------------------------------------------------------
# Computed fields / Search Fields
# ------------------------------------------------------
# ------------------------------------------------------
# Onchange / Constraints
# ------------------------------------------------------
# ------------------------------------------------------
# CRUD methods (ORM overrides)
# ------------------------------------------------------
# ------------------------------------------------------
# Actions
# ------------------------------------------------------
# ------------------------------------------------------
# Business methods
# ------------------------------------------------------
This diff is collapsed.
Click to expand it.
views/res_partner.xml
0 → 100644
+
33
−
0
View file @
ec90abdd
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2021 Le Filament
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<data>
<!-- Form view -->
<record
model=
"ir.ui.view"
id=
"res_partner_membership_form"
>
<field
name=
"name"
>
res.partner.membership.form.inherit
</field>
<field
name=
"inherit_id"
ref=
"membership.view_partner_form"
/>
<field
name=
"model"
>
res.partner
</field>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//page[@name='membership']"
position=
"attributes"
>
<attribute
name=
"attrs"
>
{'invisible': [('is_company', '!=', True)]}
</attribute>
</xpath>
<xpath
expr=
"//field[@name='free_member']"
position=
"attributes"
>
<attribute
name=
"invisible"
>
1
</attribute>
</xpath>
<xpath
expr=
"//field[@name='free_member']"
position=
"before"
>
<field
name=
"membership_number"
/>
</xpath>
<xpath
expr=
"//button[@name='%(membership.action_membership_invoice_view)d']"
position=
"attributes"
>
<attribute
name=
"invisible"
>
1
</attribute>
</xpath>
<xpath
expr=
"//field[@name='associate_member']"
position=
"attributes"
>
<attribute
name=
"invisible"
>
1
</attribute>
</xpath>
</field>
</record>
</data>
</odoo>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment