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 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) |
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
# Fulfil.IO Open Source Projects Individual Contributor License Agreement | |
Thank you for your interest in contributing to Fulfil.IO Open Source Projects ("We" or "Us"). | |
This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by electronic submission, following the instructions at . This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us. | |
## 1. Definitions | |
"You" means the individual who Submits a Contribution to Us. |
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
import requests | |
import pandas as pd | |
from pandas.io.json import json_normalize | |
import numpy as np | |
import os | |
import json | |
from google.cloud import storage, bigquery | |
import datetime | |
import time | |
from multiprocessing.pool import ThreadPool |
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
import os | |
import csv | |
import sys | |
from decimal import Decimal | |
from fulfil_client import Client | |
client = Client( | |
os.environ.get('FULFIL_SUBDOMAIN'), | |
os.environ.get('FULFIL_API_KEY'), |
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 datetime import date | |
from fulfil_client import Client | |
fulfil = Client('<subdomain>', '<apikey>') | |
# Fetch the report instance | |
# The name can be obtained from the URL | |
report = fulfil.interactive_report('account.invoice.revenue_by_month.ireport') | |
# Trigger execution with the fields |
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
"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 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 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
# Step 1: Adding the ppa where tryton is release | |
sudo add-apt-repository ppa:rayanayar/tryton-2.8 | |
# Step 2: Update the packages | |
sudo apt-get update | |
# Step 3: Install all the packages and modules at once |
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
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 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="//code.jquery.com/jquery-1.8.0.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready( | |
function() { | |
sse = new EventSource('/my_event_source'); | |
sse.onmessage = function(message) { |