This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from connection import NetSuiteConnect | |
from SuiteREST import SuiteRequest | |
from forms import send_error | |
class ExportFulfillments(): | |
def get_picking_ids(self): | |
""" Retrieve a list of Picking IDS """ | |
instance = NetSuiteConnect() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def transact_bin_move(self, cr, uid, move, context=None): | |
""" | |
Transaction Movement Method | |
:param :move Browse record of stock.move | |
Description: Update the inventory assignment table | |
with data from stock.move | |
""" | |
lock = Lock() | |
lock.acquire() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_bins(self, cr, uid, bin_selection, storage_type, list_exclusions, qty_dict, context=None): | |
base_sql = "SELECT DISTINCT bin.id " \ | |
"\nFROM stock_location_bin bin " \ | |
"\nLEFT JOIN stock_inventory stock ON stock.bin_id = bin.id" | |
first = True | |
if bin_selection == 'empty': | |
if first: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_bins(self, cr, uid, bin_selection, storage_type, list_exclusions, qty_dict, context=None): | |
base_sql = "SELECT DISTINCT bin.id " \ | |
"\nFROM stock_location_bin bin " \ | |
"\nLEFT JOIN stock_inventory stock ON stock.bin_id = bin.id" | |
first = True | |
if bin_selection == 'empty': | |
if first: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_bins(self, cr, uid, bin_selection, storage_type, list_exclusions, qty_dict, context=None): | |
""" Find a list of locations based on user-defined criteria | |
:param :bin_selection Selection field, Bins with no assignment, bins with assignment only, or all | |
:param :storage_type Filter based on a specified storage type, i.e, overstock, backstock | |
:param :list_exclusions List of bin_ids to exclude from the search | |
:param :qty_dict Quantity in bin GT/LT threshold | |
@return list of bin_ids with travel sequence | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ajax_label_request(): | |
response.generic_patterns = ['*'] | |
req = request.vars | |
qty = req["quantity"] | |
gen_prod = api_call('product.item', 'read', [int(req['item_id'])]) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _get_product_bin_info(self, products): | |
result = [] | |
for product in products: | |
product_tmpl_id = product.product_tmpl_id | |
result.append(self._get_brand_specific_items(product_tmpl_id)) | |
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def api_report_call(*args): | |
""" Send the report request to SuiteBrew """ | |
uid = session.username | |
pwd = session.password | |
url = 'http' + (secure and 's' or '') + '://' + server + ':' + port | |
report_conn = xmlrpclib.ServerProxy(url + '/xmlrpc/report') | |
try: | |
report_conn.report(dbname, 1, 'admin', *args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function setFlagForOrder($incrementIds) { | |
/** | |
* Get Core Resource | |
*/ | |
$resource = Mage::getSingleton('core/resource'); | |
/** | |
* Get Write Connection | |
*/ | |
$writeConnection = $resource->getConnection('core_write'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_sale_address(self, cr, uid, partner_id, type, context=None): | |
base_search = ('parent_id', '=', partner_id) | |
if type == 'invoice': | |
preferred = 'is_default_billing' | |
elif type == 'delivery': | |
preferred = 'is_default_shipping' | |
else: | |
preferred = False | |
if preferred: |
OlderNewer