Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vracoop_click_and_collect
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
Le Filament
Vracoop
vracoop_click_and_collect
Commits
6bb78abb
Commit
6bb78abb
authored
5 years ago
by
Juliana
Browse files
Options
Downloads
Patches
Plain Diff
modif le type de methode de livraison
parent
caada995
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
models/delivery.py
+11
-1
11 additions, 1 deletion
models/delivery.py
views/delivery_views.xml
+2
-1
2 additions, 1 deletion
views/delivery_views.xml
with
13 additions
and
2 deletions
models/delivery.py
+
11
−
1
View file @
6bb78abb
# © 2019 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from
odoo
import
fields
,
models
from
odoo
import
fields
,
models
,
api
class
VracoopDeliveryCarrier
(
models
.
Model
):
_inherit
=
'
delivery.carrier
'
type_carrier
=
fields
.
Selection
([
(
'
retrait
'
,
'
Point retrait
'
)],
string
=
"
Type
"
)
point_retrait
=
fields
.
Boolean
(
string
=
'
Point retrait
'
)
@api.onchange
(
'
type_carrier
'
)
def
onchange_type_carrier
(
self
):
for
delivery
in
self
:
if
delivery
.
type_carrier
==
'
retrait
'
:
delivery
.
point_retrait
=
True
else
:
delivery
.
point_retrait
=
False
\ No newline at end of file
This diff is collapsed.
Click to expand it.
views/delivery_views.xml
+
2
−
1
View file @
6bb78abb
...
...
@@ -7,7 +7,8 @@
<field
name=
"inherit_id"
ref=
"delivery.view_delivery_carrier_form"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//group//group"
position=
"inside"
>
<field
name=
"point_retrait"
/>
<field
name=
"type_carrier"
/>
<field
name=
"point_retrait"
invisible=
"1"
/>
</xpath>
</field>
</record>
...
...
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