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
console.log('Frappe Cloud Subscription init') |
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
<template> | |
<div class="max-w-xl mt-8 space-y-4"> | |
<Alert title="Info">Your account has been created.</Alert> | |
<div class="flex space-x-2"> | |
<Avatar label="John Doe" /> | |
<Avatar label="John Doe" imageURL="https://picsum.photos/200" /> | |
</div> | |
<div class="flex space-x-2"> |
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 frappe.frappeclient import FrappeClient | |
from unittest.mock import patch | |
client = FrappeClient('https://frappe.io', username='username', password='password') | |
articles = client.get_list('Help Article', fields=['name', 'route'], limit_page_length=200) | |
category_slug = { | |
'Accounting': 'accounts', | |
'Selling': 'selling', | |
'Asset': 'asset', |
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
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors | |
# MIT License. See license.txt | |
from __future__ import unicode_literals | |
import io | |
import re | |
def execute(file_path): | |
with open(file_path, 'r') as f: |
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
make-3-prs() { | |
push-and-pr version-11-hotfix | |
new-branch-and-cherry-pick version-12-hotfix | |
push-and-pr version-12-hotfix | |
new-branch-and-cherry-pick develop | |
push-and-pr develop | |
} |
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 | |
import fnmatch | |
import re | |
import pandas as pd | |
method_count_map = {} | |
def run(): | |
scan_path = '/Users/netchampfaris/frappe-bench/apps/erpnext' | |
ignore_patterns = ['*/node_modules/*', '*/.git/*'] |
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
arr = [ | |
[1, 1, 1, 0, 0, 0], | |
[0, 1, 0, 0, 0, 0], | |
[1, 1, 1, 0, 0, 0], | |
[0, 0, 2, 4, 4, 0], | |
[0, 0, 0, 2, 0, 0], | |
[0, 0, 1, 2, 4, 0], | |
] | |
def get_hour_glass(i, j): |
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
frappe.ui.form.on('Sales Invoice', { | |
onload(frm) { | |
console.log('onload') | |
frm.add_fetch('customer', 'car_model', 'car_model') | |
frappe.db.get_value('Company', 'Facebook', 'abbr').then(function(value) { | |
console.log(value.message.abbr) | |
}) | |
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
def nested_filters(): | |
sql_string = parse_nested_filters('Item', | |
['and', [ | |
['has_variant', '=', 1], | |
['show_in_website', '=', 0], | |
['or', [ | |
['variant_of', '=', 'test'], | |
['item_group', '=', 'product'], | |
['and', [ | |
['item_code', '>', 'hello'], |
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
var fs = require("fs"), | |
path = require("path"); | |
walk('./', function(filepath, stats) { | |
if (filepath.endsWith('.md')) { | |
const filecontent = fs.readFileSync(filepath, { encoding: 'utf-8'}); | |
const converted = convert(filecontent); | |
fs.writeFileSync(filepath, converted); | |
console.log(path.basename(filepath), 'done'); | |
} |