- Your supplier uses shopify.
- They are willing to expose inventory over Shopify API giving you a private app API key and Password.
- You are using fulfil and has product suppliers defined.
This file contains hidden or 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
"Po number","Ship to Name","Ship to address","Ship to phone number","Product name","Our SKU","Your SKU","Quantity","Amount" | |
{% for record in records -%} | |
{% for line in record.lines %}"{{ [ | |
line.purchase.number, | |
line.purchase.customer and line.purchase.customer.name, | |
line.purchase.customer and line.purchase.delivery_address.full_address.replace('\r\n', ','), | |
line.purchase.customer and line.purchase.customer.phone, | |
line.supplier_product_name or line.description, | |
line.product and line.product.code, | |
line.supplier_product_code or '', |
This file contains hidden or 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
import unicodecsv as csv | |
from kitchensink.extensions import fulfil | |
Product = fulfil.model('product.product') | |
SaleLine = fulfil.model('sale.line') | |
PurchaseLine = fulfil.model('purchase.line') | |
def format_product(product): |
This file contains hidden or 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
<div id="fulfil_widget" class="widget" title="Fulfil.IO"> | |
<div> | |
<h4>Fulfil.IO</h4> | |
<img src="https://www.fulfil.io/static/images/[email protected]" height="40px" class="img img-responsive pull-right"/> | |
</div> | |
<div class="content" id="fulfil-content">Loading..</div> | |
<div class="error" id="fulfil-error"></div> | |
</div> | |
<script type="text/template" id="contact-template"> | |
<h6>Found <%= _.keys(contacts).length %> contact(s)</h6> |
This file contains hidden or 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
import os | |
from fulfil_client import Client | |
client = Client( | |
os.environ['FULFIL_SUBDOMAIN'], | |
os.environ['FULFIL_API_KEY'] | |
) | |
This file contains hidden or 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
import os | |
from pprint import pprint | |
from fulfil_client import Client | |
client = Client(os.environ['FULFIL_SUBDOMAIN'], os.environ['FULFIL_API_KEY']) | |
Product = client.model('product.product') |
This file contains hidden or 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
import os | |
from datetime import date | |
from pprint import pprint | |
from fulfil_client import Client | |
client = Client('<subdomain>', os.environ['FULFIL_API_KEY']) | |
This file contains hidden or 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 datetime import date, time, datetime | |
import pytz | |
pacific = pytz.timezone('US/Pacific') | |
eastern = pytz.timezone('US/Eastern') | |
def get_naive_date_time(): | |
date_start = date(2016, 9, 16) | |
time_start = time(10, 0) |