feat: option to select reposting method
In current implementation selecting Item-Warehouse based reposting is better for few users, who don't use depenent SLEs but have frequent transactions involving same items. This change lets them switch to item-warehouse based reposting if required. Only use this if you understand technicalities of stock reposting. This is experimental but will become mainstream in coming days.
This commit is contained in:
parent
d220e08ba4
commit
45dd46be3d
@ -544,7 +544,12 @@ class StockController(AccountsController):
|
|||||||
"company": self.company
|
"company": self.company
|
||||||
})
|
})
|
||||||
if future_sle_exists(args):
|
if future_sle_exists(args):
|
||||||
create_item_wise_repost_entries(voucher_type=self.doctype, voucher_no=self.name)
|
item_based_reposting = cint(frappe.db.get_single_value("Stock Reposting Settings", "item_based_reposting"))
|
||||||
|
if item_based_reposting:
|
||||||
|
create_item_wise_repost_entries(voucher_type=self.doctype, voucher_no=self.name)
|
||||||
|
else:
|
||||||
|
create_repost_item_valuation_entry(args)
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_quality_inspections(doctype, docname, items):
|
def make_quality_inspections(doctype, docname, items):
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
|
"beta": 1,
|
||||||
"creation": "2021-10-01 10:56:30.814787",
|
"creation": "2021-10-01 10:56:30.814787",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
@ -10,7 +11,8 @@
|
|||||||
"limit_reposting_timeslot",
|
"limit_reposting_timeslot",
|
||||||
"start_time",
|
"start_time",
|
||||||
"end_time",
|
"end_time",
|
||||||
"limits_dont_apply_on"
|
"limits_dont_apply_on",
|
||||||
|
"item_based_reposting"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@ -44,12 +46,18 @@
|
|||||||
"fieldname": "limit_reposting_timeslot",
|
"fieldname": "limit_reposting_timeslot",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Limit timeslot for Stock Reposting"
|
"label": "Limit timeslot for Stock Reposting"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "item_based_reposting",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Use Item based reposting"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-10-01 11:27:28.981594",
|
"modified": "2021-11-02 01:22:45.155841",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Stock Reposting Settings",
|
"name": "Stock Reposting Settings",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user