mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 05:59:18 +00:00
Merge branch 'hotfix'
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '7.1.24'
|
__version__ = '7.1.25'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ def get_pricing_rule_for_item(args):
|
|||||||
})
|
})
|
||||||
|
|
||||||
if args.ignore_pricing_rule or not args.item_code:
|
if args.ignore_pricing_rule or not args.item_code:
|
||||||
if args.name and args.get("pricing_rule"):
|
if frappe.db.exists(args.doctype, args.name) and args.get("pricing_rule"):
|
||||||
item_details = remove_pricing_rule(args, item_details)
|
item_details = remove_pricing_rule(args, item_details)
|
||||||
return item_details
|
return item_details
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ from frappe.utils import cstr
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from jinja2 import TemplateSyntaxError
|
from jinja2 import TemplateSyntaxError
|
||||||
from frappe.utils.user import is_website_user
|
from frappe.utils.user import is_website_user
|
||||||
|
from frappe.model.naming import make_autoname
|
||||||
|
|
||||||
class Address(Document):
|
class Address(Document):
|
||||||
def __setup__(self):
|
def __setup__(self):
|
||||||
@@ -21,7 +22,10 @@ class Address(Document):
|
|||||||
or self.supplier or self.sales_partner or self.lead
|
or self.supplier or self.sales_partner or self.lead
|
||||||
|
|
||||||
if self.address_title:
|
if self.address_title:
|
||||||
self.name = cstr(self.address_title).strip() + "-" + cstr(self.address_type).strip()
|
self.name = (cstr(self.address_title).strip() + "-" + cstr(self.address_type).strip())
|
||||||
|
if frappe.db.exists("Address", self.name):
|
||||||
|
self.name = make_autoname(cstr(self.address_title).strip() + "-" +
|
||||||
|
cstr(self.address_type).strip() + "-.#")
|
||||||
else:
|
else:
|
||||||
throw(_("Address Title is mandatory."))
|
throw(_("Address Title is mandatory."))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user