mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 02:31:21 +00:00
Merge branch 'version-13-hotfix' of https://github.com/frappe/erpnext into e-commerce-refactor
This commit is contained in:
@@ -350,4 +350,3 @@ def is_sync_complete(shopify_settings, order):
|
||||
return getdate(shopify_settings.to_date) < getdate(order.get('created_at'))
|
||||
else:
|
||||
return cstr(order.get('id')) == cstr(shopify_settings.to_order_id)
|
||||
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
|
||||
@@ -103,4 +103,4 @@ class xml2dict(object):
|
||||
"""parse a string"""
|
||||
t = ET.fromstring(s)
|
||||
root_tag, root_tree = self._namespace_split(t.tag, self._parse_node(t))
|
||||
return object_dict({root_tag: root_tree})
|
||||
return object_dict({root_tag: root_tree})
|
||||
|
||||
@@ -17,4 +17,4 @@ class ExotelSettings(Document):
|
||||
response = requests.get('https://api.exotel.com/v1/Accounts/{sid}'
|
||||
.format(sid = self.account_sid), auth=(self.api_key, self.api_token))
|
||||
if response.status_code != 200:
|
||||
frappe.throw(_("Invalid credentials"))
|
||||
frappe.throw(_("Invalid credentials"))
|
||||
|
||||
@@ -25,4 +25,4 @@
|
||||
</table>
|
||||
{% else %}
|
||||
<p style="margin-top: 30px;"> Account Balance Information Not Available. </p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -115,4 +115,4 @@ class MpesaConnector():
|
||||
|
||||
saf_url = "{0}{1}".format(self.base_url, "/mpesa/stkpush/v1/processrequest")
|
||||
r = requests.post(saf_url, headers=headers, json=payload)
|
||||
return r.json()
|
||||
return r.json()
|
||||
|
||||
@@ -50,4 +50,4 @@ def create_pos_settings(record_dict):
|
||||
for record in record_dict:
|
||||
if frappe.db.exists("POS Field", {"fieldname": record.get("fieldname")}):
|
||||
continue
|
||||
frappe.get_doc(record).insert()
|
||||
frappe.get_doc(record).insert()
|
||||
|
||||
@@ -276,4 +276,4 @@ def fetch_param_value(response, key, key_field):
|
||||
"""Fetch the specified key from list of dictionary. Key is identified via the key field."""
|
||||
for param in response:
|
||||
if param[key_field] == key:
|
||||
return param["Value"]
|
||||
return param["Value"]
|
||||
|
||||
@@ -355,4 +355,4 @@ def get_account_balance_callback_payload():
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ class PlaidConnector():
|
||||
"secret": self.settings.plaid_secret,
|
||||
"products": self.products,
|
||||
})
|
||||
|
||||
|
||||
return args
|
||||
|
||||
def get_link_token(self, update_mode=False):
|
||||
|
||||
@@ -135,4 +135,4 @@ erpnext.integrations.plaidLink = class plaidLink {
|
||||
});
|
||||
}, __("Select a company"), __("Continue"));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -110,7 +110,7 @@ def add_bank_accounts(response, bank, company):
|
||||
frappe.msgprint(_("Bank account {0} already exists and could not be created again").format(account["name"]))
|
||||
except Exception:
|
||||
frappe.log_error(frappe.get_traceback(), title=_("Plaid Link Error"))
|
||||
frappe.throw(_("There was an error creating Bank Account while linking with Plaid."),
|
||||
frappe.throw(_("There was an error creating Bank Account while linking with Plaid."),
|
||||
title=_("Plaid Link Failed"))
|
||||
|
||||
else:
|
||||
|
||||
@@ -346,4 +346,4 @@ erpnext.tally_migration.get_html_rows = (logs, field) => {
|
||||
}).join("");
|
||||
|
||||
return rows
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class WoocommerceSettings(Document):
|
||||
for doctype in ["Customer", "Address"]:
|
||||
df = dict(fieldname='woocommerce_email', label='Woocommerce Email', fieldtype='Data', read_only=1, print_hide=1)
|
||||
create_custom_field(doctype, df)
|
||||
|
||||
|
||||
if not frappe.get_value("Item Group", {"name": _("WooCommerce Products")}):
|
||||
item_group = frappe.new_doc("Item Group")
|
||||
item_group.item_group_name = _("WooCommerce Products")
|
||||
@@ -74,4 +74,4 @@ def generate_secret():
|
||||
def get_series():
|
||||
return {
|
||||
"sales_order_series" : frappe.get_meta("Sales Order").get_options("naming_series") or "SO-WOO-",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,4 @@ def create_subscription_on_stripe(stripe_settings):
|
||||
stripe_settings.integration_request.db_set('status', 'Failed', update_modified=False)
|
||||
frappe.log_error(frappe.get_traceback())
|
||||
|
||||
return stripe_settings.finalize_request()
|
||||
return stripe_settings.finalize_request()
|
||||
|
||||
@@ -52,7 +52,7 @@ def create_mode_of_payment(gateway, payment_type="General"):
|
||||
"payment_gateway": gateway
|
||||
}, ['payment_account'])
|
||||
|
||||
mode_of_payment = frappe.db.exists("Mode of Payment", gateway)
|
||||
mode_of_payment = frappe.db.exists("Mode of Payment", gateway)
|
||||
if not mode_of_payment and payment_gateway_account:
|
||||
mode_of_payment = frappe.get_doc({
|
||||
"doctype": "Mode of Payment",
|
||||
|
||||
Reference in New Issue
Block a user