Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
0
Merge Requests
0
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
Alexander Emmerich
erp5
Commits
57cab231
Commit
57cab231
authored
Nov 02, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trade: only check stock availability for sales in "Add Lines" fast input
parent
b947037f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_updateFastInputLineList.xml
...tal_skins/erp5_trade/Delivery_updateFastInputLineList.xml
+8
-2
No files found.
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_updateFastInputLineList.xml
View file @
57cab231
...
...
@@ -60,6 +60,11 @@
product\n
"""\n
no_inventory = False\n
\n
# Check that the requested quantities does not exceed available inventory.\n
# We only enforce this check for sales.\n
check_stock_availability = False\n
\n
portal = context.getPortalObject()\n
Base_translateString = portal.Base_translateString\n
\n
...
...
@@ -73,6 +78,7 @@ if line_portal_type in portal.getPortalSaleTypeList():\n
supply_cell_portal_type = "Sale Supply Cell"\n
supply_line_id = "default_ssl"\n
use_list = portal.portal_preferences.getPreferredSaleUseList()\n
check_stock_availability = True\n
elif line_portal_type in portal.getPortalPurchaseTypeList():\n
section_uid = context.getDestinationSectionUid()\n
supply_cell_portal_type = "Purchase Supply Cell"\n
...
...
@@ -193,9 +199,9 @@ for line in listbox:\n
request.form["field_listbox_current_quantity_new_%s"%line_id] = product.getCurrentInventory(section_uid=section_uid)\n
\n
# Check if quantity is available\n
if available_inv < line["quantity"]:\n
if
check_stock_availability and
available_inv < line["quantity"]:\n
status_message_dict.setdefault(product.getRelativeUrl(), []).append(line[\'listbox_key\'])\n
\n
\n
status_message_list = []\n
if status_message_dict:\n
for product_relative_url, line_id_list in status_message_dict.items():\n
...
...
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