Merge branch 'staging-fixes' into pos_issue

This commit is contained in:
Deepesh Garg 2019-01-29 11:29:41 +05:30 committed by GitHub
commit a8cc4b105d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
290 changed files with 579 additions and 241 deletions

View File

@ -18,7 +18,7 @@ Includes: Accounting, Inventory, Manufacturing, CRM, Sales, Purchase, Project Ma
ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & JavaScript.
- [User Guide](https://erpnext.org/docs/user)
- [User Guide](https://erpnext.com/docs/user)
- [Discussion Forum](https://discuss.erpnext.com/)
---

View File

@ -1,5 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, os, json

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import unittest
import frappe

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
DEFAULT_MAPPERS = [
{
'doctype': 'Cash Flow Mapper',

View File

@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,7 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import json

View File

@ -217,6 +217,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
this.get_terms();
},
customer: function() {
if (this.frm.doc.is_pos){
var pos_profile = this.frm.doc.pos_profile;
}
var me = this;
if(this.frm.updating_party_details) return;
erpnext.utils.get_party_details(this.frm,
@ -226,6 +229,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
party_type: "Customer",
account: this.frm.doc.debit_to,
price_list: this.frm.doc.selling_price_list,
pos_profile: pos_profile
}, function() {
me.apply_pricing_rule();
});

View File

@ -398,11 +398,16 @@ class SalesInvoice(SellingController):
self.account_for_change_amount = pos.get('account_for_change_amount')
for fieldname in ('territory', 'naming_series', 'currency', 'taxes_and_charges', 'letter_head', 'tc_name',
'selling_price_list', 'company', 'select_print_heading', 'cash_bank_account', 'company_address',
'company', 'select_print_heading', 'cash_bank_account', 'company_address',
'write_off_account', 'write_off_cost_center', 'apply_discount_on'):
if (not for_validate) or (for_validate and not self.get(fieldname)):
self.set(fieldname, pos.get(fieldname))
customer_price_list = frappe.get_value("Customer", self.customer, 'default_price_list')
if not customer_price_list:
self.set('selling_price_list', pos.get('selling_price_list'))
if not for_validate:
self.update_stock = cint(pos.get("update_stock"))

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -22,18 +22,20 @@ class DuplicatePartyAccountError(frappe.ValidationError): pass
@frappe.whitelist()
def get_party_details(party=None, account=None, party_type="Customer", company=None, posting_date=None,
bill_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False, fetch_payment_terms_template=True, party_address=None, shipping_address=None):
bill_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False, fetch_payment_terms_template=True,
party_address=None, shipping_address=None, pos_profile=None):
if not party:
return {}
if not frappe.db.exists(party_type, party):
frappe.throw(_("{0}: {1} does not exists").format(party_type, party))
return _get_party_details(party, account, party_type,
company, posting_date, bill_date, price_list, currency, doctype, ignore_permissions, fetch_payment_terms_template, party_address, shipping_address)
company, posting_date, bill_date, price_list, currency, doctype, ignore_permissions,
fetch_payment_terms_template, party_address, shipping_address, pos_profile)
def _get_party_details(party=None, account=None, party_type="Customer", company=None, posting_date=None,
bill_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False,
fetch_payment_terms_template=True, party_address=None, shipping_address=None):
fetch_payment_terms_template=True, party_address=None, shipping_address=None, pos_profile=None):
out = frappe._dict(set_account_and_due_date(party, account, party_type, company, posting_date, bill_date, doctype))
party = out[party_type.lower()]
@ -49,7 +51,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
set_address_details(out, party, party_type, doctype, company, party_address, shipping_address)
set_contact_details(out, party, party_type)
set_other_values(out, party, party_type)
set_price_list(out, party, party_type, price_list)
set_price_list(out, party, party_type, price_list, pos_profile)
out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out.customer_group, out.supplier_type)
@ -149,12 +151,20 @@ def get_default_price_list(party):
return None
def set_price_list(out, party, party_type, given_price_list):
def set_price_list(out, party, party_type, given_price_list, pos=None):
# price list
price_list = get_permitted_documents('Price List')
if price_list:
price_list = price_list[0]
elif pos and party_type == 'Customer':
customer_price_list = frappe.get_value('Customer', party.name, 'default_price_list')
if customer_price_list:
price_list = customer_price_list
else:
pos_price_list = frappe.get_value('POS Profile', pos, 'selling_price_list')
price_list = pos_price_list or given_price_list
else:
price_list = get_default_price_list(party) or given_price_list

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
import frappe.defaults
import unittest

View File

@ -190,7 +190,7 @@ class AccountsReceivableSummary(ReceivablePayableReport):
def get_voucherwise_data(self, party_naming_by, args):
voucherwise_data = ReceivablePayableReport(self.filters).run(args)[1]
cols = ["posting_date", "party", "customer-contact"]
cols = ["posting_date", "party"]
if party_naming_by == "Naming Series":
cols += ["party_name"]

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from erpnext import get_company_currency, get_default_company
from erpnext.setup.utils import get_exchange_rate

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import unittest
from erpnext.accounts.party import get_party_shipping_address
from frappe.test_runner import make_test_objects

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
def get_data():
return {
'fieldname': 'asset_name',

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1 +1 @@
- [ERPNext Manual in German](http://erpnext.org/docs/user/manual/de/) contributed by [CWT Connector & Wire Technology GmbH](http://www.cwt-assembly.com/)
- [ERPNext Manual in German](http://erpnext.com/docs/user/manual/de/) contributed by [CWT Connector & Wire Technology GmbH](http://www.cwt-assembly.com/)

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,5 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, json
from frappe.utils.make_random import get_random
@ -162,7 +163,7 @@ def make_assessment_groups():
def get_json_path(doctype):
return frappe.get_app_path('erpnext', 'demo', 'data', frappe.scrub(doctype) + '.json')
def weighted_choice(weights):
totals = []
running_total = 0

View File

@ -1,5 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, json
from frappe.utils.make_random import get_random

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
data = {
'desktop_icons': [
'Agriculture Task',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
data = {
'desktop_icons': [
'Item',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
data = {
'desktop_icons': [
'Student',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
data = {
'desktop_icons': [
'Patient',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
data = {
'desktop_icons': [
'Restaurant',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
data = {
'desktop_icons': [
'Item',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
data = {
'desktop_icons': [
'Non Profit',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
data = {
'desktop_icons': [
'POS',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
data = {
'desktop_icons': [
'Project',

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def pre_process(issue):

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
def pre_process(milestone):
return {
'title': milestone.title,

View File

@ -4,6 +4,7 @@
# Basic interface to Amazon MWS
# Based on http://code.google.com/p/amazon-mws-python
# Extended to include finances object
from __future__ import unicode_literals
import urllib
import hashlib

View File

@ -6,6 +6,7 @@ Borrowed from https://github.com/timotheus/ebaysdk-python
@author: pierre
"""
from __future__ import unicode_literals
import xml.etree.ElementTree as ET
import re

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import cstr, cint, get_request_session

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _
import base64, hashlib, hmac

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -16,8 +16,6 @@ staging_version = '11.0.3-beta.37'
error_report_email = "support@erpnext.com"
docs_app = "foundation"
app_include_js = "assets/js/erpnext.min.js"
app_include_css = "assets/css/erpnext.css"
web_include_js = "assets/js/erpnext-web.min.js"

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
def get_data():
return {
'fieldname': 'attendance_request',

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
def get_data():
return {
'transactions': [

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
def get_data():
return {
'fieldname': 'holiday_list',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
def get_data():
return {
'fieldname': 'leave_block_list',

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
def get_data():
return {
'fieldname': 'leave_policy',

View File

@ -1,3 +1,5 @@
from __future__ import unicode_literals
def get_data():
return {
'fieldname': 'leave_type',

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
data = {

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,5 +1,6 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from frappe import _
def get_data():

View File

@ -581,4 +581,5 @@ erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
erpnext.patches.v11_0.set_missing_gst_hsn_code
erpnext.patches.v11_0.rename_bom_wo_fields
erpnext.patches.v11_0.rename_additional_salary_component_additional_salary
erpnext.patches.v11_0.renamed_from_to_fields_in_project
erpnext.patches.v11_0.renamed_from_to_fields_in_project
erpnext.patches.v11_0.add_permissions_in_gst_settings

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.model.utils.rename_field import rename_field

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def execute():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def execute():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def execute():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def execute():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def execute():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.utils.nestedset import rebuild_tree

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from erpnext.stock.utils import get_bin

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def execute():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe.model.rename_doc import get_fetch_fields

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import os
import frappe

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe, os
from frappe import _

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def execute():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _

View File

@ -1,6 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _

View File

@ -0,0 +1,12 @@
import frappe
from frappe.permissions import add_permission, update_permission_property
def execute():
company = frappe.get_all('Company', filters = {'country': 'India'})
if not company:
return
for doctype in ('GST HSN Code', 'GST Settings'):
add_permission(doctype, 'Accounts Manager', 0)
update_permission_property(doctype, 'Accounts Manager', 0, 'write', 1)
update_permission_property(doctype, 'Accounts Manager', 0, 'create', 1)

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.setup.setup_wizard.operations.install_fixtures import add_sale_stages

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def execute():

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from erpnext.setup.install import create_default_success_action

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils.nestedset import rebuild_tree

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
import frappe
def execute():

Some files were not shown because too many files have changed in this diff Show More