Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
825c5b68
Commit
825c5b68
authored
Jun 04, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: add comment on the discount packing list
parent
69526e77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/OpenSaleOrderCell_createDiscountSalePackingList.py
...equest/OpenSaleOrderCell_createDiscountSalePackingList.py
+3
-4
No files found.
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/OpenSaleOrderCell_createDiscountSalePackingList.py
View file @
825c5b68
...
@@ -42,13 +42,14 @@ sale_packing_list_edit_kw = dict(
...
@@ -42,13 +42,14 @@ sale_packing_list_edit_kw = dict(
if
(
0
<
unused_day_count
):
#(subscription_request.getPrice() != 0) and (0 < unused_day_count):
if
(
0
<
unused_day_count
):
# If the open order starts before today,
# If the open order starts before today,
# generate a discount to the user on his next invoice
# generate a discount to the user on his next invoice
# and reduce the stock consumption
sale_packing_list
=
portal
.
sale_packing_list_module
.
newContent
(
sale_packing_list
=
portal
.
sale_packing_list_module
.
newContent
(
portal_type
=
"Sale Packing List"
,
portal_type
=
"Sale Packing List"
,
# description='XXX unused day %s - prevision %s' % (unused_day_count, context.getQuantityPrecisionFromResource(subscription_request.getResourceValue())
),
comment
=
"%s unused days of %s"
%
(
unused_day_count
,
next_period_date
-
start_date
),
**
sale_packing_list_edit_kw
**
sale_packing_list_edit_kw
)
)
...
@@ -121,8 +122,6 @@ if (0 < unused_day_count):#(subscription_request.getPrice() != 0) and (0 < unuse
...
@@ -121,8 +122,6 @@ if (0 < unused_day_count):#(subscription_request.getPrice() != 0) and (0 < unuse
# Quantity is negative, to reduce the stock of the consumed product
# Quantity is negative, to reduce the stock of the consumed product
quantity
=-
quantity
,
quantity
=-
quantity
,
price
=
open_sale_order_cell
.
getPrice
(),
price
=
open_sale_order_cell
.
getPrice
(),
# quantity=1,
# price=price,
aggregate_value_list
=
aggregate_value_list
,
aggregate_value_list
=
aggregate_value_list
,
activate_kw
=
activate_kw
activate_kw
=
activate_kw
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment