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
3c02513e
Commit
3c02513e
authored
2 years ago
by
Daniil Digtyar Vasilieva
Browse files
Options
Downloads
Patches
Plain Diff
Set active to falte to use as template
parent
4ec4e7bc
No related branches found
No related tags found
2 merge requests
!86
Fix partners company
,
!66
14.0 fix migration error and nice to have
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
energy_communities/data/product_data.xml
+1
-1
1 addition, 1 deletion
energy_communities/data/product_data.xml
energy_communities/wizards/multicompany_easy_creation.py
+3
-3
3 additions, 3 deletions
energy_communities/wizards/multicompany_easy_creation.py
with
4 additions
and
4 deletions
energy_communities/data/product_data.xml
+
1
−
1
View file @
3c02513e
...
...
@@ -14,7 +14,7 @@
<field
name=
"list_price"
>
0
</field>
<field
name=
"by_company"
>
True
</field>
<field
name=
"by_individual"
>
True
</field>
<field
name=
"
company_id"
ref=
"base.main_company"
>
</field>
<field
name=
"
active"
>
False
</field>
</record>
</data>
</odoo>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
energy_communities/wizards/multicompany_easy_creation.py
+
3
−
3
View file @
3c02513e
...
...
@@ -55,11 +55,11 @@ class AccountMulticompanyEasyCreationWiz(models.TransientModel):
def
create_capital_share_product_template
(
self
):
# We use sudo to be able to copy the product and not needing to be in the main company
new_share_product
=
self
.
sudo
().
env
.
ref
(
'
energy_communities.share_capital_product_template
'
).
copy
()
new_share_product
.
write
({
self
.
sudo
().
env
.
ref
(
'
energy_communities.share_capital_product_template
'
).
copy
({
'
name
'
:
_
(
'
Contribution to Share Capital
'
),
'
company_id
'
:
self
.
new_company_id
.
id
,
'
list_price
'
:
self
.
capital_share
'
list_price
'
:
self
.
capital_share
,
'
active
'
:
True
})
def
update_values_from_crm_lead
(
self
):
...
...
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