Description - Get BOM Item Rate based on summation of their individual line item for Sales Order and Quotation. Custom Print format which shows sub bom leaf items.
- Go to bench directory i.e /home/ubuntu/frappe-bench
- ~/frappe-bench$ bench get-app palazon https://github.com/ashish-greycube/palazon
- ~/frappe-bench$ bench --site site1.local install-app palazon
- ~/frappe-bench$ bench --site site1.local migrate
- ~/frappe-bench$ bench clear-cache
- ~/frappe-bench$ bench restart
Following line is to be added to sales_order.py and quotation.py
#start singapore - exploded bom
from palazon.api import set_missing_item_details, set_items_amount, set_items
#end singapore - exploded bom
[a] apps/erpnext/selling/doctype/sales_order/sales_order.py
sales_order.py before changes
sales_order.py after changes
class SalesOrder(SellingController):
def __init__(self, *args, **kwargs):
super(SalesOrder, self).__init__(*args, **kwargs)
#start singapore - exploded bom
from palazon.api import set_missing_item_details, set_items_amount, set_items
#end singapore - exploded bom
def validate(self):
super(SalesOrder, self).validate()
[b] apps/erpnext/erpnext/selling/doctype/quotation.py
quotation.py before changes
quotation.py after changes
class Quotation(SellingController):
#start singapore - exploded bom
from palazon.api import set_missing_item_details, set_items_amount, set_items
#end singapore - exploded bom
def set_indicator(self):
- Terms and Conditions in Quotation and Sales Order
- LetterHead
- Sales Taxes and Charges
Name : Standard Terms Sales Order
PRICE : IN SINGAPORE DOLLARS & SUBJECT TO {% if not taxes: %} 0 {%else%} {{taxes[0].rate}}{%endif%}% GST
DELIVERY TERM : 2 WEEKS
PAYMENT TERM : 30 DAYS
PRICE : IN SINGAPORE DOLLARS & SUBJECT TO {% if not taxes: %} 0 {%else%} {{taxes[0].rate}}{%endif%}% GST
DELIVERY TERM : 2 WEEK
VALIDITY OF QUOTE : 4 WEEKS FROM DATE OF QUOTATION
PAYMENT TERM : 30 DAYS
We look forward to receiving your purchase order soon.
<h1>WT WHITS TECHNOLOGIES</h1>
<div><div>Blk 4012 , Ang Mo Kio Ave 10 #05-04A/04, Tech Place 1</div>
<div>Singapore 569628 ( GST <a href="http://Reg.No">Reg.No</a>: 52-929615-B )</div>
<div>Tel : 6458 5707</div>
<div>Fax : 6458 5708</div>
</div>
<div><br></div>
<div><div>{% set u = frappe.get_doc("User", frappe.user) %} <br></div>
<h5>{{ u.first_name }} {{ u.last_name }}</h5>
<br></div>
Step 4: Go to Sales Taxes and Charges and make Singapore tax as default, it will load by default in new Sales Order /Quotation.
To see the print format in action, go to New Sales Order/Quotation and select respective Term in Terms and Condition field.
Go to Print Section.
-
~/frappe-bench/apps/erpnext$ git status modified: erpnext/selling/doctype/sales_order/sales_order.py modified: erpnext/selling/doctype/quotation/quotation.py
-
~/frappe-bench/apps/erpnext$ git stash
-
Once update, is done i.e. ~/frappe-bench$ bench update
-
Revert the stash changes back ~/frappe-bench/apps/erpnext$ git stash pop
-
On new server with frappe and erpnext installed, install palazon app
~/frappe-bench$ bench get-app palazon https://github.com/ashish-greycube/palazon
~/frappe-bench$ bench --site site1.local install-app palazon
-
Restore DB from old server
-
Edit sales_order.py and quotation.py of erpnext (for detailed steps refer above)
-
~/frappe-bench$ bench --site site1.local migrate
-
~/frappe-bench$ bench clear-cache
-
~/frappe-bench$ bench restart
MIT

1st ERPNext Certified Partner
& winner of the Best Partner Award



