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
81d3bb15
Commit
81d3bb15
authored
1 year ago
by
Benjami
Browse files
Options
Downloads
Patches
Plain Diff
Fix wizard creation
parent
de27ed0b
No related branches found
No related tags found
2 merge requests
!253
[REL] Release 06/11/23
,
!191
V1 imrpvements to CompanyEasyCreation wizard (CRM Lead execution)🙋
Pipeline
#45825
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
energy_communities/models/crm_lead.py
+4
-10
4 additions, 10 deletions
energy_communities/models/crm_lead.py
energy_communities/wizards/multicompany_easy_creation.py
+2
-2
2 additions, 2 deletions
energy_communities/wizards/multicompany_easy_creation.py
with
6 additions
and
12 deletions
energy_communities/models/crm_lead.py
+
4
−
10
View file @
81d3bb15
...
...
@@ -301,10 +301,6 @@ class CrmLead(models.Model):
"
vat
"
:
metadata
.
get
(
"
ce_vat
"
,
False
)
and
metadata
[
"
ce_vat
"
]
or
None
,
"
foundation_date
"
:
foundation_date
,
"
default_lang_id
"
:
lang_id
and
lang_id
.
id
or
None
,
"
hierarchy_level
"
:
"
community
"
if
self
.
source_id
==
self
.
env
.
ref
(
"
energy_communities.ce_source_creation_ce_proposal
"
)
else
None
,
"
chart_template_id
"
:
self
.
env
[
"
account.chart.template
"
]
.
search
([(
"
name
"
,
"
=
"
,
"
PGCE PYMEs 2008
"
)])[
0
]
.
id
,
...
...
@@ -346,18 +342,16 @@ class CrmLead(models.Model):
}
def
action_create_community
(
self
):
default_company_vals
=
{
"
default_{}
"
.
format
(
field
):
value
for
field
,
value
in
self
.
_get_default_community_wizard
().
items
()
}
data
=
self
.
_get_default_community_wizard
()
wizard
=
self
.
env
[
"
account.multicompany.easy.creation.wiz
"
].
create
(
data
)
return
{
"
type
"
:
"
ir.actions.act_window
"
,
"
name
"
:
"
Create community
"
,
"
res_model
"
:
"
account.multicompany.easy.creation.wiz
"
,
"
view_type
"
:
"
form
"
,
"
view_mode
"
:
"
form
"
,
"
target
"
:
"
new
"
,
"
context
"
:
default_company_vals
,
"
res_id
"
:
wizard
.
id
,
}
...
...
This diff is collapsed.
Click to expand it.
energy_communities/wizards/multicompany_easy_creation.py
+
2
−
2
View file @
81d3bb15
...
...
@@ -171,7 +171,7 @@ class AccountMulticompanyEasyCreationWiz(models.TransientModel):
self
.
new_company_id
.
write
(
vals
)
def
set_cooperative_account
(
self
):
self_new_company
=
self
.
with_company
(
new_company_id
)
self_new_company
=
self
.
with_company
(
self
.
new_company_id
)
new_company
=
self_new_company
.
new_company_id
new_company
.
write
(
{
...
...
@@ -204,7 +204,7 @@ class AccountMulticompanyEasyCreationWiz(models.TransientModel):
self_new_company
=
self
.
with_company
(
self
.
new_company_id
)
self_new_company
.
new_company_id
.
create_user
=
self
.
create_user
self
.
update_product_category_company_share
()
#
self.create_capital_share_product_template()
self
.
create_capital_share_product_template
()
self
.
add_company_managers
()
self
.
add_company_log
()
return
action
...
...
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