Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cgscop_timesheet
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
Hervé Silvant - CGScop
cgscop_timesheet
Commits
41c45bb7
Commit
41c45bb7
authored
5 years ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[fix] change le compte analytique associé lors du changement de nom du projet
parent
cae70b06
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/project.py
+9
-1
9 additions, 1 deletion
models/project.py
views/hr_timesheet_cgscop.xml
+1
-0
1 addition, 0 deletions
views/hr_timesheet_cgscop.xml
with
10 additions
and
1 deletion
models/project.py
+
9
−
1
View file @
41c45bb7
# © 2019 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
from
odoo
import
models
,
fields
,
api
class
ScopProjectTimesheet
(
models
.
Model
):
...
...
@@ -20,3 +20,11 @@ class ScopProjectTimesheet(models.Model):
index
=
True
,
on_delete
=
'
restrict
'
,
default
=
_default_ur
)
@api.onchange
(
'
name
'
)
def
onchange_name
(
self
):
analytic
=
self
.
analytic_account_id
if
analytic
and
analytic
.
ensure_one
():
self
.
analytic_account_id
.
sudo
().
write
({
'
name
'
:
self
.
name
,
})
This diff is collapsed.
Click to expand it.
views/hr_timesheet_cgscop.xml
+
1
−
0
View file @
41c45bb7
...
...
@@ -34,6 +34,7 @@
</group>
<group>
<field
name=
"cgscop_timesheet_code_id"
required=
"1"
placeholder=
"Code activité National"
options=
"{'no_open': True, 'no_create': True}"
/>
<field
name=
"analytic_account_id"
invisible=
"1"
/>
<field
name=
"privacy_visibility"
invisible=
"1"
/>
<field
name=
"allow_timesheets"
invisible=
"1"
/>
</group>
...
...
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