[fix] [minor] update item price on change of item details
This commit is contained in:
parent
68888a21ec
commit
af30c3fdfd
@ -49,6 +49,7 @@ class DocType(DocListController, WebsiteGenerator):
|
||||
def on_update(self):
|
||||
self.validate_name_with_item_group()
|
||||
self.update_website()
|
||||
self.update_item_price()
|
||||
|
||||
def check_warehouse_is_set_for_stock_item(self):
|
||||
if self.doc.is_stock_item=="Yes" and not self.doc.default_warehouse:
|
||||
@ -210,6 +211,11 @@ class DocType(DocListController, WebsiteGenerator):
|
||||
|
||||
WebsiteGenerator.on_update(self)
|
||||
|
||||
def update_item_price(self):
|
||||
webnotes.conn.sql("""update `tabItem Price` set item_name=%s,
|
||||
item_description=%s where item_code=%s""",
|
||||
(self.doc.item_name, self.doc.description, self.doc.name))
|
||||
|
||||
def get_page_title(self):
|
||||
if self.doc.name==self.doc.item_name:
|
||||
page_name_from = self.doc.name
|
||||
|
Loading…
x
Reference in New Issue
Block a user