Merge branch 'develop' into e-commerce-refactor-develop

This commit is contained in:
Marica
2022-02-02 10:45:14 +05:30
committed by GitHub
27 changed files with 456 additions and 222 deletions

View File

@@ -0,0 +1,19 @@
import frappe
def execute():
frappe.reload_doc("setup", "doctype", "company")
company = frappe.qb.DocType("Company")
frappe.qb.update(
company
).set(
company.enable_provisional_accounting_for_non_stock_items, company.enable_perpetual_inventory_for_non_stock_items
).set(
company.default_provisional_account, company.service_received_but_not_billed
).where(
company.enable_perpetual_inventory_for_non_stock_items == 1
).where(
company.service_received_but_not_billed.isnotnull()
).run()

View File

@@ -27,7 +27,7 @@ def create_new_cost_center_allocation_records(cc_allocations):
cca.submit()
def get_existing_cost_center_allocations():
if not frappe.get_meta("Cost Center").has_field("enable_distributed_cost_center"):
if not frappe.db.exists("DocType", "Distributed Cost Center"):
return
par = frappe.qb.DocType("Cost Center")