Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
31c4a9c8
Commit
31c4a9c8
authored
Mar 19, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#2595 : Add barcode to associated member
parent
49b9ab4c
Pipeline
#1981
passed with stage
in 2 minutes 11 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
models.py
members/models.py
+3
-1
config.md
outils/config.md
+2
-0
No files found.
members/models.py
View file @
31c4a9c8
...
...
@@ -539,11 +539,13 @@ class CagetteMember(models.Model):
'zip'
:
post_data
[
'zip'
],
'city'
:
post_data
[
'city'
],
'phone'
:
format_phone_number
(
post_data
[
'mobile'
]),
# Because list view default show Phone and people mainly gives mobile
'barcode_rule_id'
:
settings
.
COOP
_BARCODE_RULE_ID
,
'barcode_rule_id'
:
settings
.
ASSOCIATE
_BARCODE_RULE_ID
,
'parent_id'
:
post_data
[
'parent_id'
],
'is_associated_people'
:
True
}
associated_member_id
=
api
.
create
(
'res.partner'
,
associated_member
)
am
=
CagetteMember
(
associated_member_id
)
res
[
'bca'
]
=
am
.
generate_base_and_barcode
(
post_data
)
# If it's an new associated member with a new partner. Link will be made by the user in BDM/admin
# We add the associated member to the "associate" shift template so we can find them in Odoo
elif
'is_associated_people'
not
in
post_data
or
'is_associated_people'
in
post_data
and
'parent_id'
not
in
post_data
:
...
...
outils/config.md
View file @
31c4a9c8
...
...
@@ -69,6 +69,8 @@
-
COOP_BARCODE_RULE_ID = 11
-
ASSOCIATE_BARCODE_RULE_ID = 12
-
FUNDRAISING_CAT_ID = 1
-
PARTS_PRICE_UNIT = 10.0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment