mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-18 20:49:19 +00:00
Merge branch 'develop'
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
__version__ = '5.5.0'
|
__version__ = '5.5.1'
|
||||||
|
|||||||
@@ -92,13 +92,13 @@ def get_charts_for_country(country):
|
|||||||
with open(os.path.join(path, fname), "r") as f:
|
with open(os.path.join(path, fname), "r") as f:
|
||||||
_get_chart_name(f.read())
|
_get_chart_name(f.read())
|
||||||
|
|
||||||
countries_use_OHADA_system = ["Benin", "Burkina Faso", "Cameroon", "Central African Republic", "Comoros",
|
# countries_use_OHADA_system = ["Benin", "Burkina Faso", "Cameroon", "Central African Republic", "Comoros",
|
||||||
"Congo", "Ivory Coast", "Gabon", "Guinea", "Guinea Bissau", "Equatorial Guinea", "Mali", "Niger",
|
# "Congo", "Ivory Coast", "Gabon", "Guinea", "Guinea Bissau", "Equatorial Guinea", "Mali", "Niger",
|
||||||
"Replica of Democratic Congo", "Senegal", "Chad", "Togo"]
|
# "Replica of Democratic Congo", "Senegal", "Chad", "Togo"]
|
||||||
|
#
|
||||||
if country in countries_use_OHADA_system:
|
# if country in countries_use_OHADA_system:
|
||||||
with open(os.path.join(os.path.dirname(__file__), "syscohada_syscohada_chart_template.json"), "r") as f:
|
# with open(os.path.join(os.path.dirname(__file__), "syscohada_syscohada_chart_template.json"), "r") as f:
|
||||||
_get_chart_name(f.read())
|
# _get_chart_name(f.read())
|
||||||
|
|
||||||
if len(charts) != 1:
|
if len(charts) != 1:
|
||||||
charts.append("Standard")
|
charts.append("Standard")
|
||||||
|
|||||||
@@ -112,8 +112,8 @@ class BuyingController(StockController):
|
|||||||
valuation_amount_adjustment -= item.item_tax_amount
|
valuation_amount_adjustment -= item.item_tax_amount
|
||||||
|
|
||||||
self.round_floats_in(item)
|
self.round_floats_in(item)
|
||||||
|
if flt(item.conversion_factor)==0:
|
||||||
item.conversion_factor = get_conversion_factor(item.item_code, item.uom).get("conversion_factor") or 1.0
|
item.conversion_factor = get_conversion_factor(item.item_code, item.uom).get("conversion_factor") or 1.0
|
||||||
|
|
||||||
qty_in_stock_uom = flt(item.qty * item.conversion_factor)
|
qty_in_stock_uom = flt(item.qty * item.conversion_factor)
|
||||||
rm_supp_cost = flt(item.rm_supp_cost) if self.doctype=="Purchase Receipt" else 0.0
|
rm_supp_cost = flt(item.rm_supp_cost) if self.doctype=="Purchase Receipt" else 0.0
|
||||||
|
|||||||
@@ -138,8 +138,6 @@ def subscribe(email):
|
|||||||
_("Click here to verify")
|
_("Click here to verify")
|
||||||
)
|
)
|
||||||
|
|
||||||
print url
|
|
||||||
|
|
||||||
content = """
|
content = """
|
||||||
<p>{0}. {1}.</p>
|
<p>{0}. {1}.</p>
|
||||||
<p><a href="{2}">{3}</a></p>
|
<p><a href="{2}">{3}</a></p>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ blogs.
|
|||||||
"""
|
"""
|
||||||
app_icon = "icon-th"
|
app_icon = "icon-th"
|
||||||
app_color = "#e74c3c"
|
app_color = "#e74c3c"
|
||||||
app_version = "5.5.0"
|
app_version = "5.5.1"
|
||||||
github_link = "https://github.com/frappe/erpnext"
|
github_link = "https://github.com/frappe/erpnext"
|
||||||
|
|
||||||
error_report_email = "support@erpnext.com"
|
error_report_email = "support@erpnext.com"
|
||||||
|
|||||||
@@ -152,7 +152,9 @@ $.extend(cur_frm.cscript, {
|
|||||||
method: "erpnext.manufacturing.doctype.production_order.production_order.get_item_details",
|
method: "erpnext.manufacturing.doctype.production_order.production_order.get_item_details",
|
||||||
args: { item: doc.production_item },
|
args: { item: doc.production_item },
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
cur_frm.set_value(r.message);
|
$.each(["description", "stock_uom", "bom_no"], function(i, field) {
|
||||||
|
cur_frm.set_value(field, r.message[field]);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -187,8 +189,8 @@ $.extend(cur_frm.cscript, {
|
|||||||
|
|
||||||
bom_no: function() {
|
bom_no: function() {
|
||||||
return this.frm.call({
|
return this.frm.call({
|
||||||
doc: this.frm.doc,
|
doc: this.frm.doc,
|
||||||
method: "set_production_order_operations"
|
method: "set_production_order_operations"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ $(document).bind('toolbar_setup', function() {
|
|||||||
href="https://discuss.erpnext.com">Feedback</a></p>'
|
href="https://discuss.erpnext.com">Feedback</a></p>'
|
||||||
|
|
||||||
|
|
||||||
$('.navbar-home').html('<img class="erpnext-icon" src="/assets/erpnext/images/erp-icon.svg" />');
|
$('.navbar-home').html('<img class="erpnext-icon" src="'+
|
||||||
|
frappe.urllib.get_base_url()+'/assets/erpnext/images/erp-icon.svg" />');
|
||||||
|
|
||||||
$('[data-link="docs"]').attr("href", "https://manual.erpnext.com")
|
$('[data-link="docs"]').attr("href", "https://manual.erpnext.com")
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -133,11 +133,12 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
|||||||
var me = this;
|
var me = this;
|
||||||
this.toggle_enable_bom();
|
this.toggle_enable_bom();
|
||||||
|
|
||||||
return this.frm.call({
|
return frappe.call({
|
||||||
method: "get_production_order_details",
|
method: "erpnext.stock.doctype.stock_entry.stock_entry.get_production_order_details",
|
||||||
args: {production_order: this.frm.doc.production_order},
|
args: {production_order: this.frm.doc.production_order},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if (!r.exc) {
|
if (!r.exc) {
|
||||||
|
me.frm.set_value(r.message);
|
||||||
if (me.frm.doc.purpose == "Material Transfer for Manufacture" && !me.frm.doc.to_warehouse)
|
if (me.frm.doc.purpose == "Material Transfer for Manufacture" && !me.frm.doc.to_warehouse)
|
||||||
me.frm.set_value("to_warehouse", r.message["wip_warehouse"]);
|
me.frm.set_value("to_warehouse", r.message["wip_warehouse"]);
|
||||||
me.frm.set_value("from_bom", 1);
|
me.frm.set_value("from_bom", 1);
|
||||||
|
|||||||
@@ -300,22 +300,21 @@ class update_entries_after(object):
|
|||||||
|
|
||||||
# select first batch or the batch with same rate
|
# select first batch or the batch with same rate
|
||||||
batch = self.stock_queue[index]
|
batch = self.stock_queue[index]
|
||||||
if batch[0]:
|
if qty_to_pop >= batch[0]:
|
||||||
if qty_to_pop >= batch[0]:
|
# consume current batch
|
||||||
# consume current batch
|
qty_to_pop = qty_to_pop - batch[0]
|
||||||
qty_to_pop = qty_to_pop - batch[0]
|
self.stock_queue.pop(index)
|
||||||
self.stock_queue.pop(index)
|
if not self.stock_queue and qty_to_pop:
|
||||||
if not self.stock_queue and qty_to_pop:
|
# stock finished, qty still remains to be withdrawn
|
||||||
# stock finished, qty still remains to be withdrawn
|
# negative stock, keep in as a negative batch
|
||||||
# negative stock, keep in as a negative batch
|
self.stock_queue.append([-qty_to_pop, outgoing_rate or batch[1]])
|
||||||
self.stock_queue.append([-qty_to_pop, outgoing_rate or batch[1]])
|
break
|
||||||
break
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# qty found in current batch
|
# qty found in current batch
|
||||||
# consume it and exit
|
# consume it and exit
|
||||||
batch[0] = batch[0] - qty_to_pop
|
batch[0] = batch[0] - qty_to_pop
|
||||||
qty_to_pop = 0
|
qty_to_pop = 0
|
||||||
|
|
||||||
stock_value = sum((flt(batch[0]) * flt(batch[1]) for batch in self.stock_queue))
|
stock_value = sum((flt(batch[0]) * flt(batch[1]) for batch in self.stock_queue))
|
||||||
stock_qty = sum((flt(batch[0]) for batch in self.stock_queue))
|
stock_qty = sum((flt(batch[0]) for batch in self.stock_queue))
|
||||||
|
|||||||
@@ -133,20 +133,19 @@ def get_fifo_rate(previous_stock_queue, qty):
|
|||||||
qty_to_pop = abs(qty)
|
qty_to_pop = abs(qty)
|
||||||
while qty_to_pop and previous_stock_queue:
|
while qty_to_pop and previous_stock_queue:
|
||||||
batch = previous_stock_queue[0]
|
batch = previous_stock_queue[0]
|
||||||
if batch[0]:
|
if 0 < batch[0] <= qty_to_pop:
|
||||||
if 0 < batch[0] <= qty_to_pop:
|
# if batch qty > 0
|
||||||
# if batch qty > 0
|
# not enough or exactly same qty in current batch, clear batch
|
||||||
# not enough or exactly same qty in current batch, clear batch
|
available_qty_for_outgoing += flt(batch[0])
|
||||||
available_qty_for_outgoing += flt(batch[0])
|
outgoing_cost += flt(batch[0]) * flt(batch[1])
|
||||||
outgoing_cost += flt(batch[0]) * flt(batch[1])
|
qty_to_pop -= batch[0]
|
||||||
qty_to_pop -= batch[0]
|
previous_stock_queue.pop(0)
|
||||||
previous_stock_queue.pop(0)
|
else:
|
||||||
else:
|
# all from current batch
|
||||||
# all from current batch
|
available_qty_for_outgoing += flt(qty_to_pop)
|
||||||
available_qty_for_outgoing += flt(qty_to_pop)
|
outgoing_cost += flt(qty_to_pop) * flt(batch[1])
|
||||||
outgoing_cost += flt(qty_to_pop) * flt(batch[1])
|
batch[0] -= qty_to_pop
|
||||||
batch[0] -= qty_to_pop
|
qty_to_pop = 0
|
||||||
qty_to_pop = 0
|
|
||||||
|
|
||||||
return outgoing_cost / available_qty_for_outgoing
|
return outgoing_cost / available_qty_for_outgoing
|
||||||
|
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -1,6 +1,6 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
version = "5.5.0"
|
version = "5.5.1"
|
||||||
|
|
||||||
with open("requirements.txt", "r") as f:
|
with open("requirements.txt", "r") as f:
|
||||||
install_requires = f.readlines()
|
install_requires = f.readlines()
|
||||||
|
|||||||
Reference in New Issue
Block a user