diff --git a/accounts/doctype/pos_setting/pos_setting.js b/accounts/doctype/pos_setting/pos_setting.js index 62549bb2ced..653b6318cd7 100755 --- a/accounts/doctype/pos_setting/pos_setting.js +++ b/accounts/doctype/pos_setting/pos_setting.js @@ -18,8 +18,10 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){ $c_obj(make_doclist(cdt,cdn),'get_series','',function(r,rt){ if(r.message) set_field_options('naming_series', r.message); }); - + cur_frm.set_query("price_list_name", function() { + return { filters: { buying_or_selling: "Selling" } }; + }); } //cash bank account diff --git a/accounts/doctype/pos_setting/pos_setting.txt b/accounts/doctype/pos_setting/pos_setting.txt index 44549737e28..d82749011a8 100755 --- a/accounts/doctype/pos_setting/pos_setting.txt +++ b/accounts/doctype/pos_setting/pos_setting.txt @@ -2,7 +2,7 @@ { "creation": "2013-05-24 12:15:51", "docstatus": 0, - "modified": "2013-07-05 14:50:33", + "modified": "2013-07-26 11:16:53", "modified_by": "Administrator", "owner": "Administrator" }, @@ -94,11 +94,11 @@ { "doctype": "DocField", "fieldname": "price_list_name", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Price List", "oldfieldname": "price_list_name", "oldfieldtype": "Select", - "options": "link:Price List", + "options": "Price List", "read_only": 0, "reqd": 1 }, diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt index 625d2c9c1c2..acc9ebee1de 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.txt +++ b/accounts/doctype/sales_invoice/sales_invoice.txt @@ -2,7 +2,7 @@ { "creation": "2013-05-24 19:29:05", "docstatus": 0, - "modified": "2013-07-25 16:08:10", + "modified": "2013-07-26 11:16:58", "modified_by": "Administrator", "owner": "Administrator" }, @@ -247,11 +247,11 @@ { "doctype": "DocField", "fieldname": "price_list_name", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Price List", "oldfieldname": "price_list_name", "oldfieldtype": "Select", - "options": "link:Price List", + "options": "Price List", "print_hide": 1, "read_only": 0, "reqd": 1 diff --git a/buying/doctype/purchase_order/test_purchase_order.py b/buying/doctype/purchase_order/test_purchase_order.py index 2c354b52b13..75eac9478ff 100644 --- a/buying/doctype/purchase_order/test_purchase_order.py +++ b/buying/doctype/purchase_order/test_purchase_order.py @@ -70,6 +70,12 @@ class TestPurchaseOrder(unittest.TestCase): po.doc.conversion_rate = 0.0167 self.assertRaises(WrongWarehouseCompany, po.insert) + def test_uom_integer_validation(self): + from utilities.transaction_base import UOMMustBeIntegerError + po = webnotes.bean(copy=test_records[0]) + po.doclist[1].qty = 3.4 + self.assertRaises(UOMMustBeIntegerError, po.insert) + test_dependencies = ["BOM"] @@ -101,7 +107,7 @@ test_records = [ "import_rate": 500.0, "amount": 5000.0, "warehouse": "_Test Warehouse - _TC", - "stock_uom": "Nos", + "stock_uom": "_Test UOM", "uom": "_Test UOM", "schedule_date": "2013-03-01" } diff --git a/config.json b/config.json index 29d24fe9821..c9d1aa71f81 100644 --- a/config.json +++ b/config.json @@ -87,9 +87,6 @@ "no_cache": true, "template": "app/website/templates/pages/account" }, - "attributions": { - "template": "app/website/templates/pages/attributions" - }, "blog": { "template": "app/website/templates/pages/blog", "args_method": "website.helpers.blog.get_blog_template_args" diff --git a/home/page/attributions/README.md b/home/page/attributions/README.md deleted file mode 100644 index a5237bb8ce2..00000000000 --- a/home/page/attributions/README.md +++ /dev/null @@ -1 +0,0 @@ -Attributions for software libraries / images used in ERPNext. \ No newline at end of file diff --git a/home/page/attributions/__init__.py b/home/page/attributions/__init__.py deleted file mode 100644 index baffc488252..00000000000 --- a/home/page/attributions/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/home/page/attributions/attributions.css b/home/page/attributions/attributions.css deleted file mode 100644 index 1de05eec8e5..00000000000 --- a/home/page/attributions/attributions.css +++ /dev/null @@ -1,3 +0,0 @@ -.layout-attributions td:first-child { - width: 30%; -} \ No newline at end of file diff --git a/home/page/attributions/attributions.html b/home/page/attributions/attributions.html deleted file mode 100644 index 00f63428371..00000000000 --- a/home/page/attributions/attributions.html +++ /dev/null @@ -1,143 +0,0 @@ -
-
-
-

ERPNext is made using these Awesome Open Source Projects

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ERPNextWeb based, Open Source ERP.
- Get top class hosting and support at ERPNext.com
wnframeworkThe full stack Python + Javascript web application framework on which ERPNext is built.
Linux Operating SystemThe operating system that brought a revolution in Open Source software.
MySQL DatabaseThe world's most popular Open Source Database.
Apache HTTPD web serverThe Number One HTTP Server On The Internet.
MemcachedFree & open source, high-performance, distributed memory object caching system.
Python Programming LanguageThe "batteries included" language that lets you write elegant code, quickly.

Python Libraries: -
    -
  • MySQLdb -
  • pytz -
  • jinja2 -
  • markdown2 -
  • dateutil -
  • termcolor -
  • python-memcached -
  • requests -
  • chardet -
  • pygeoip -
  • dropbox -
  • google-api-python-client -
-
Git - Source Code ManagementGit is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

- Kindly hosted on the web by GitHub: The service that makes it easier for individuals and teams to write better code, faster.
JQuery Javascript LibaryThe write less, do more Javascript Library.
JQuery UI - User Interface LibraryA curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.
Bootstrap CSS FrameworkSleek, intuitive, and powerful front-end framework for faster and easier web development.
Font Awesome - IconsThe iconic font designed for use with Twitter Bootstrap.
TinyMCE Rich Text EditorTinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB.
SlickGridA lightning fast JavaScript grid/spreadsheet.
FullCalendarFullCalendar is a jQuery plugin that provides a full-sized, drag and drop calendar.
Flot Charting LibraryAttractive JavaScript plotting for jQuery.
Ace Code EditorHigh Performance Code Editor for the web.
JQuery.Gantt - Gantt ChartsDraw Gantt charts with the famous jQuery ease of development.
JQuery Tag-itSimple and configurable tag editing widget with autocomplete support.
JSColor - Color PickerHTML/Javascript Color Picker.
QUnitA JavaScript Unit Testing framework.
Downloadify - Flash Download WidgetA tiny javascript + Flash library that enables the creation and download of text files without server interaction.
GeoLite data by MaxMindGeoLite data created by MaxMind, available from - https://www.maxmind.com
- -
-

ERPNext License: GNU/General Public License

-
-

ERPNext - Open Source, web based ERP

-

Copyright © 2012, Web Notes Technologies Pvt Ltd, India

- -

This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version.

- -

This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details.

- -

For complete license see http://www.gnu.org/licenses/

-
-

Note: A link to this page must be easily accessible and all other ERPNext branding must remain as it is.

-
-

For more information please write to us at support@erpnext.com

-
-
\ No newline at end of file diff --git a/home/page/attributions/attributions.js b/home/page/attributions/attributions.js deleted file mode 100644 index 29eb72f1719..00000000000 --- a/home/page/attributions/attributions.js +++ /dev/null @@ -1,4 +0,0 @@ -wn.pages['attributions'].onload = function(wrapper) { - wrapper.appframe = new wn.ui.AppFrame($(wrapper).find(".layout-appframe"), - "Attributions"); -} \ No newline at end of file diff --git a/home/page/attributions/attributions.py b/home/page/attributions/attributions.py deleted file mode 100644 index fbba0997d8f..00000000000 --- a/home/page/attributions/attributions.py +++ /dev/null @@ -1,2 +0,0 @@ -from __future__ import unicode_literals -import webnotes \ No newline at end of file diff --git a/home/page/attributions/attributions.txt b/home/page/attributions/attributions.txt deleted file mode 100644 index 547d9bc59c4..00000000000 --- a/home/page/attributions/attributions.txt +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "creation": "2012-03-01 12:30:42", - "docstatus": 0, - "modified": "2013-07-11 14:41:47", - "modified_by": "Administrator", - "owner": "Administrator" - }, - { - "doctype": "Page", - "icon": "icon-trophy", - "module": "Home", - "name": "__common__", - "page_name": "attributions", - "standard": "Yes", - "title": "Attributions" - }, - { - "doctype": "Page", - "name": "attributions" - } -] \ No newline at end of file diff --git a/patches/july_2013/p08_custom_print_format_net_total_export.py b/patches/july_2013/p08_custom_print_format_net_total_export.py index a6a833537b3..c848ac9d626 100644 --- a/patches/july_2013/p08_custom_print_format_net_total_export.py +++ b/patches/july_2013/p08_custom_print_format_net_total_export.py @@ -3,13 +3,14 @@ import webnotes import re def execute(): - for name, html in webnotes.conn.sql("""select name, html from `tabPrint Format` where standard='No'"""): - changed = False - for match in re.findall("(doc.net_total.*doc.conversion_rate)", html): - if match.replace(" ", "") == "doc.net_total/doc.conversion_rate": - html = html.replace(match, "doc.net_total_export") - changed = True + for name, html in webnotes.conn.sql("""select name, html from `tabPrint Format` where standard='No' + and ifnull(html, '')!=''"""): + changed = False + for match in re.findall("(doc.net_total.*doc.conversion_rate)", html): + if match.replace(" ", "") == "doc.net_total/doc.conversion_rate": + html = html.replace(match, "doc.net_total_export") + changed = True - if changed: - webnotes.conn.set_value("Print Format", name, "html", html) + if changed: + webnotes.conn.set_value("Print Format", name, "html", html) \ No newline at end of file diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt index 7f16466fb44..7949c0393f4 100644 --- a/selling/doctype/quotation/quotation.txt +++ b/selling/doctype/quotation/quotation.txt @@ -2,7 +2,7 @@ { "creation": "2013-05-24 19:29:08", "docstatus": 0, - "modified": "2013-07-23 15:27:53", + "modified": "2013-07-26 11:16:53", "modified_by": "Administrator", "owner": "Administrator" }, @@ -281,12 +281,12 @@ "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", "doctype": "DocField", "fieldname": "price_list_name", - "fieldtype": "Select", + "fieldtype": "Link", "in_filter": 1, "label": "Price List", "oldfieldname": "price_list_name", "oldfieldtype": "Select", - "options": "link:Price List", + "options": "Price List", "print_hide": 1, "read_only": 0, "reqd": 1, diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js index 246d4a1ad36..dbd0a1aacea 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/doctype/sales_common/sales_common.js @@ -70,6 +70,22 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ this.frm.fields_dict.lead && this.frm.set_query("lead", function(doc,cdt,cdn) { return{ query:"controllers.queries.lead_query" } }); + if(this.frm.fields_dict.price_list_name) { + this.frm.set_query("price_list_name", function() { + return { filters: { buying_or_selling: "Selling" } }; + }); + + this.frm.set_query("price_list_currency", function() { + return { + query: "controllers.queries.get_price_list_currency", + filters: { + price_list_name: me.frm.doc.price_list_name, + buying_or_selling: "Selling" + } + }; + }); + } + if(!this.fname) { return; } diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt index 3e6cbe4ac73..8c27b60568d 100644 --- a/selling/doctype/sales_order/sales_order.txt +++ b/selling/doctype/sales_order/sales_order.txt @@ -2,7 +2,7 @@ { "creation": "2013-06-18 12:39:59", "docstatus": 0, - "modified": "2013-07-23 15:27:39", + "modified": "2013-07-26 11:16:55", "modified_by": "Administrator", "owner": "Administrator" }, @@ -294,11 +294,11 @@ "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", "doctype": "DocField", "fieldname": "price_list_name", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Price List", "oldfieldname": "price_list_name", "oldfieldtype": "Select", - "options": "link:Price List", + "options": "Price List", "print_hide": 1, "reqd": 1, "width": "100px" diff --git a/setup/doctype/price_list/price_list.txt b/setup/doctype/price_list/price_list.txt index 1af2e1ba80f..febf47180f4 100644 --- a/setup/doctype/price_list/price_list.txt +++ b/setup/doctype/price_list/price_list.txt @@ -2,7 +2,7 @@ { "creation": "2013-01-25 11:35:09", "docstatus": 0, - "modified": "2013-07-23 12:03:25", + "modified": "2013-07-26 11:19:06", "modified_by": "Administrator", "owner": "Administrator" }, @@ -55,6 +55,7 @@ "doctype": "DocField", "fieldname": "currency", "fieldtype": "Link", + "in_list_view": 1, "label": "Currency", "options": "Currency", "reqd": 1 @@ -64,6 +65,7 @@ "doctype": "DocField", "fieldname": "buying_or_selling", "fieldtype": "Select", + "in_list_view": 1, "label": "Valid for Buying or Selling?", "options": "Buying\nSelling", "reqd": 1 diff --git a/setup/doctype/uom/test_uom.py b/setup/doctype/uom/test_uom.py index 51c2bdd92fe..7dbb28c5026 100644 --- a/setup/doctype/uom/test_uom.py +++ b/setup/doctype/uom/test_uom.py @@ -1,6 +1,11 @@ test_records = [ [{ "doctype": "UOM", - "uom_name": "_Test UOM" + "uom_name": "_Test UOM", + "must_be_whole_number": 1 + }], + [{ + "doctype": "UOM", + "uom_name": "_Test UOM 1" }] ] \ No newline at end of file diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt index aa9530fa9a5..3008b799cb9 100644 --- a/stock/doctype/delivery_note/delivery_note.txt +++ b/stock/doctype/delivery_note/delivery_note.txt @@ -2,7 +2,7 @@ { "creation": "2013-05-24 19:29:09", "docstatus": 0, - "modified": "2013-07-23 15:28:18", + "modified": "2013-07-26 11:16:57", "modified_by": "Administrator", "owner": "Administrator" }, @@ -286,11 +286,11 @@ "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", "doctype": "DocField", "fieldname": "price_list_name", - "fieldtype": "Select", + "fieldtype": "Link", "label": "Price List", "oldfieldname": "price_list_name", "oldfieldtype": "Select", - "options": "link:Price List", + "options": "Price List", "print_hide": 1, "read_only": 0, "reqd": 1 diff --git a/utilities/page/__init__.py b/utilities/page/__init__.py deleted file mode 100644 index baffc488252..00000000000 --- a/utilities/page/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/utilities/page/markdown_reference/README.md b/utilities/page/markdown_reference/README.md deleted file mode 100644 index 80f16cb4ec0..00000000000 --- a/utilities/page/markdown_reference/README.md +++ /dev/null @@ -1 +0,0 @@ -Markdown reference. \ No newline at end of file diff --git a/utilities/page/markdown_reference/__init__.py b/utilities/page/markdown_reference/__init__.py deleted file mode 100644 index baffc488252..00000000000 --- a/utilities/page/markdown_reference/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/utilities/page/markdown_reference/markdown_reference.css b/utilities/page/markdown_reference/markdown_reference.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/utilities/page/markdown_reference/markdown_reference.html b/utilities/page/markdown_reference/markdown_reference.html deleted file mode 100644 index 767ac36e301..00000000000 --- a/utilities/page/markdown_reference/markdown_reference.html +++ /dev/null @@ -1,150 +0,0 @@ -
-
-
- Markdown Reference - × -
-
-
-
-

Phrase Emphasis

-
*italic*   **bold**
-_italic_   __bold__
-
- -

Links

- -

Inline:

- -
An [example](http://url.com/ "Title")
-
- -

Reference-style labels (titles are optional):

- -
An [example][id]. Then, anywhere
-else in the doc, define the link:
-
-   [id]: http://example.com/  "Title"
-
- -

Images

- -

Inline (titles are optional):

- -
![alt text](/path/img.jpg "Title")
-
- -

Reference-style:

- -
![alt text][id]
-
-    [id]: /url/to/img.jpg "Title"
-
- -

Headers

- -

Setext-style:

- -
Header 1
-========
-
-Header 2
---------
-
-
- -

atx-style (closing #'s are optional):

- -
# Header 1 #
-
-
-
- -

Lists

- -

Ordered, without paragraphs:

- -
1.  Foo
-2.  Bar
-
- -

Unordered, with paragraphs:

- -
*   A list item.
-
-    With multiple paragraphs.
-
-*   Bar
-
- -

You can nest them:

- -
*   Abacus
-    * ass
-*   Bastard
-    1.  bitch
-    2.  bupkis
-        * BELITTLER
-    3. burper
-*   Cunning
-
- -

Blockquotes

- -
> Email-style angle brackets
-
-> are used for blockquotes.
-
-> > And, they can be nested.
-
-> >
-> * You can quote a list.
-> * Etc.
-
- -

Code Spans

- -
`<code>` spans are delimited
-by backticks.
-
-You can include literal backticks
-like `` `this` ``.
-
- -

Preformatted Code Blocks

- -

Indent every line of a code block by at least 4 spaces or 1 tab, and use a colon at the end of the preceding paragraph.

- -
This is a normal paragraph:
-
-    This is a preformatted
-    code block.
-
-Preceded by a space, the colon
-disappears. :
-
-    This is a preformatted
-    code block.
-
- -

Horizontal Rules

- -

Three or more dashes or asterisks:

- -
---
-
-* * *
-
-- - - -
-
- -

Manual Line Breaks

- -

End a line with two or more spaces:

- -
Roses are red,
-Violets are blue.
-
-
-
-
\ No newline at end of file diff --git a/utilities/page/markdown_reference/markdown_reference.js b/utilities/page/markdown_reference/markdown_reference.js deleted file mode 100644 index 8e8fbac2c90..00000000000 --- a/utilities/page/markdown_reference/markdown_reference.js +++ /dev/null @@ -1 +0,0 @@ -wn.pages['markdown-reference'].onload = function(wrapper) { } \ No newline at end of file diff --git a/utilities/page/markdown_reference/markdown_reference.py b/utilities/page/markdown_reference/markdown_reference.py deleted file mode 100644 index fbba0997d8f..00000000000 --- a/utilities/page/markdown_reference/markdown_reference.py +++ /dev/null @@ -1,2 +0,0 @@ -from __future__ import unicode_literals -import webnotes \ No newline at end of file diff --git a/utilities/page/markdown_reference/markdown_reference.txt b/utilities/page/markdown_reference/markdown_reference.txt deleted file mode 100644 index 29066441342..00000000000 --- a/utilities/page/markdown_reference/markdown_reference.txt +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "creation": "2012-08-07 12:35:30", - "docstatus": 0, - "modified": "2013-07-11 14:43:28", - "modified_by": "Administrator", - "owner": "Administrator" - }, - { - "doctype": "Page", - "icon": "icon-code", - "module": "Utilities", - "name": "__common__", - "page_name": "Markdown Reference", - "standard": "Yes", - "title": "Markdown Reference" - }, - { - "doctype": "Page", - "name": "markdown-reference" - } -] \ No newline at end of file diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py index 4acfdf4e597..fc746c4ef59 100644 --- a/utilities/transaction_base.py +++ b/utilities/transaction_base.py @@ -95,7 +95,7 @@ class TransactionBase(StatusUpdater): self.doc.price_list for fieldname, val in customer_defaults.items(): - if not self.doc.fields.get(fieldname) and self.meta.get_field(fieldname): + if self.meta.get_field(fieldname): self.doc.fields[fieldname] = val if self.meta.get_field("sales_team"): @@ -135,7 +135,7 @@ class TransactionBase(StatusUpdater): def set_supplier_defaults(self): for fieldname, val in self.get_supplier_defaults().items(): - if not self.doc.fields.get(fieldname) and self.meta.get_field(fieldname): + if self.meta.get_field(fieldname): self.doc.fields[fieldname] = val def get_lead_defaults(self): @@ -502,6 +502,8 @@ def delete_events(ref_type, ref_name): webnotes.delete_doc("Event", webnotes.conn.sql_list("""select name from `tabEvent` where ref_type=%s and ref_name=%s""", (ref_type, ref_name)), for_reload=True) +class UOMMustBeIntegerError(webnotes.ValidationError): pass + def validate_uom_is_integer(doclist, uom_field, qty_fields): if isinstance(qty_fields, basestring): qty_fields = [qty_fields] @@ -520,4 +522,4 @@ def validate_uom_is_integer(doclist, uom_field, qty_fields): webnotes.msgprint(_("For UOM") + " '" + d.fields[uom_field] \ + "': " + _("Quantity cannot be a fraction.") \ + " " + _("In Row") + ": " + str(d.idx), - raise_exception=True) + raise_exception=UOMMustBeIntegerError) diff --git a/website/templates/html/footer.html b/website/templates/html/footer.html index 3161987ed80..0e6cca7dc65 100644 --- a/website/templates/html/footer.html +++ b/website/templates/html/footer.html @@ -23,7 +23,7 @@ {% endif %}

- ERPNext Powered + ERPNext Powered