mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-04 14:08:29 +00:00
[fix] [minor] merge conflict fixed
This commit is contained in:
@@ -80,7 +80,7 @@ class DocType:
|
||||
# update in home page in settings
|
||||
website_settings = webnotes.bean("Website Settings", "Website Settings")
|
||||
website_settings.doc.home_page = webpage.doc.name
|
||||
website_settings.doc.banner_html = """<h3 style='margin-bottom: 20px;'>""" + self.doc.name + "</h3>"
|
||||
website_settings.doc.brand_html = self.doc.name
|
||||
website_settings.doc.copyright = self.doc.name
|
||||
website_settings.doclist.append({
|
||||
"doctype": "Top Bar Item",
|
||||
@@ -302,18 +302,17 @@ class DocType:
|
||||
where doctype='Global Defaults' and field='default_company'
|
||||
and value=%s""", self.doc.name)
|
||||
|
||||
def on_rename(self,newdn,olddn, merge=False):
|
||||
def before_rename(self, olddn, newdn, merge=False):
|
||||
if merge:
|
||||
msgprint(_("Sorry. Companies cannot be merged"), raise_exception=True)
|
||||
|
||||
webnotes.conn.sql("""update `tabCompany` set company_name=%s
|
||||
where name=%s""", (newdn, olddn))
|
||||
|
||||
webnotes.conn.sql("""update `tabSingles` set value=%s
|
||||
where doctype='Global Defaults' and field='default_company'
|
||||
and value=%s""", (newdn, olddn))
|
||||
|
||||
webnotes.defaults.clear_default("company", value=olddn)
|
||||
webnotes.throw(_("Sorry, companies cannot be merged"))
|
||||
|
||||
def after_rename(self, olddn, newdn, merge=False):
|
||||
webnotes.conn.set(self.doc, "company_name", newdn)
|
||||
|
||||
webnotes.conn.sql("""update `tabDefaultValue` set defvalue=%s
|
||||
where defkey='Company' and defvalue=%s""", (newdn, olddn))
|
||||
|
||||
webnotes.defaults.clear_cache()
|
||||
|
||||
@webnotes.whitelist()
|
||||
def replace_abbr(company, old, new):
|
||||
@@ -329,3 +328,12 @@ def replace_abbr(company, old, new):
|
||||
for dt in ["Account", "Cost Center", "Warehouse"]:
|
||||
_rename_record(dt)
|
||||
webnotes.conn.commit()
|
||||
|
||||
def get_name_with_abbr(name, company):
|
||||
company_abbr = webnotes.conn.get_value("Company", company, "abbr")
|
||||
parts = name.split(" - ")
|
||||
|
||||
if parts[-1].lower() != company_abbr.lower():
|
||||
parts.append(company_abbr)
|
||||
|
||||
return " - ".join(parts)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-03-25 17:53:21",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-07-09 10:41:38",
|
||||
"modified": "2013-11-22 12:30:07",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@@ -86,7 +86,7 @@
|
||||
"doctype": "DocField",
|
||||
"fieldname": "always_use_login_id_as_sender",
|
||||
"fieldtype": "Check",
|
||||
"label": "Always use Login Id as sender"
|
||||
"label": "Always use above Login Id as sender"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% block content %}
|
||||
{% include 'app/stock/doctype/item/templates/includes/product_search_box.html' %}
|
||||
{% include 'app/stock/doctype/item/templates/includes/product_breadcrumbs.html' %}
|
||||
<div class="col-md-12">
|
||||
<div class="container content">
|
||||
{% if slideshow %}<!-- slideshow -->
|
||||
{% include "lib/website/doctype/website_slideshow/templates/includes/slideshow.html" %}
|
||||
{% endif %}
|
||||
@@ -13,7 +13,7 @@
|
||||
<h3>{{ name }}</h3>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="container content">
|
||||
{% if sub_groups %}
|
||||
<hr />
|
||||
<div class="row">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends base_template %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-12" itemscope itemtype="http://schema.org/Organization">
|
||||
<div class="container content" itemscope itemtype="http://schema.org/Organization">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{% if logo -%}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% set title="Partners" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-12">
|
||||
<div class="container content">
|
||||
<h2 id="blog-title">{{ title }}</h2>
|
||||
<hr>
|
||||
{% for partner_info in partners %}
|
||||
|
||||
Reference in New Issue
Block a user