Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odoo CE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Comunitats Energètiques
Odoo CE
Commits
151a3453
Commit
151a3453
authored
1 year ago
by
Benjami
Browse files
Options
Downloads
Patches
Plain Diff
Added new fields in create company wiz
parent
078af4c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!253
[REL] Release 06/11/23
,
!191
V1 imrpvements to CompanyEasyCreation wizard (CRM Lead execution)🙋
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
energy_communities/wizards/multicompany_easy_creation.py
+49
-5
49 additions, 5 deletions
energy_communities/wizards/multicompany_easy_creation.py
energy_communities/wizards/multicompany_easy_creation.xml
+11
-6
11 additions, 6 deletions
energy_communities/wizards/multicompany_easy_creation.xml
with
60 additions
and
11 deletions
energy_communities/wizards/multicompany_easy_creation.py
+
49
−
5
View file @
151a3453
...
...
@@ -23,12 +23,8 @@ class AccountMulticompanyEasyCreationWiz(models.TransientModel):
)
crm_lead_id
=
fields
.
Many2one
(
"
crm.lead
"
,
string
=
"
CRM Lead
"
)
property_cooperator_account
=
fields
.
Many2one
(
comodel_name
=
"
account.account
"
,
comodel_name
=
"
account.account
.template
"
,
string
=
"
Cooperator Account
"
,
domain
=
[
(
"
internal_type
"
,
"
=
"
,
"
receivable
"
),
(
"
deprecated
"
,
"
=
"
,
False
),
],
help
=
"
This account will be
"
"
the default one as the
"
"
receivable account for the
"
...
...
@@ -53,6 +49,54 @@ class AccountMulticompanyEasyCreationWiz(models.TransientModel):
readonly
=
True
,
)
default_lang_id
=
fields
.
Many2one
(
comodel_name
=
"
res.lang
"
,
string
=
"
Language
"
,
)
street
=
fields
.
Char
(
string
=
"
Address
"
,
)
city
=
fields
.
Char
(
string
=
"
City
"
,
)
zip_code
=
fields
.
Char
(
string
=
"
ZIP code
"
,
)
foundation_date
=
fields
.
Date
(
string
=
"
Foundation date
"
)
vat
=
fields
.
Char
(
string
=
"
ZIP code
"
,
)
email
=
fields
.
Char
(
string
=
"
Email
"
,
)
phone
=
fields
.
Char
(
string
=
"
Phone
"
,
)
def
add_company_managers
(
self
):
coord_members
=
self
.
parent_id
.
get_users
([
"
role_coord_admin
"
,
"
role_coord_worker
"
])
for
manager
in
coord_members
:
manager
.
make_ce_user
(
self
.
new_company_id
,
"
role_ce_manager
"
)
def
add_company_log
(
self
):
message
=
_
(
"
Community created from: <a href=
'
/web#id={id}&view_type=form&model=crm.lead&menu_id={menu_id}
'
>{name}</a>
"
)
self
.
new_company_id
.
message_post
(
body
=
message
.
format
(
id
=
self
.
crm_lead_id
.
id
,
menu_id
=
self
.
env
.
ref
(
"
crm.crm_menu_root
"
).
id
,
name
=
self
.
crm_lead_id
.
name
,
)
)
def
update_product_category_company_share
(
self
):
new_company_id
=
self
.
new_company_id
.
id
self_new_company
=
self
.
with_company
(
new_company_id
)
...
...
This diff is collapsed.
Click to expand it.
energy_communities/wizards/multicompany_easy_creation.xml
+
11
−
6
View file @
151a3453
...
...
@@ -23,12 +23,17 @@
</page>
</xpath>
<xpath
expr=
"//page"
position=
"before"
>
<page
string=
"Energy Communities"
>
<group
string=
"Energy Communities"
>
<field
name=
"parent_id"
/>
</group>
<group
string=
"Create from CRM Lead"
>
<field
name=
"crm_lead_id"
/>
<page
string=
"Energy Community"
>
<group
string=
"Energy Community"
>
<field
name=
"parent_id"
></field>
<field
name=
"default_lang_id"
></field>
<field
name=
"street"
></field>
<field
name=
"city"
></field>
<field
name=
"zip_code"
></field>
<field
name=
"foundation_date"
></field>
<field
name=
"vat"
></field>
<field
name=
"email"
></field>
<field
name=
"phone"
></field>
</group>
</page>
</xpath>
...
...
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