chore: format patch file

This commit is contained in:
Deepesh Garg 2022-04-02 20:36:36 +05:30
parent c58fde2fb2
commit a7e125a540

View File

@ -3,27 +3,51 @@ from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
def execute(): def execute():
company = frappe.get_all('Company', filters = {'country': 'India'}, fields=['name']) company = frappe.get_all("Company", filters={"country": "India"}, fields=["name"])
if not company: if not company:
return return
sales_invoice_gst_fields = [ sales_invoice_gst_fields = [
dict(fieldname='billing_address_gstin', label='Billing Address GSTIN', dict(
fieldtype='Data', insert_after='customer_address', read_only=1, fieldname="billing_address_gstin",
fetch_from='customer_address.gstin', print_hide=1, length=15), label="Billing Address GSTIN",
dict(fieldname='customer_gstin', label='Customer GSTIN', fieldtype="Data",
fieldtype='Data', insert_after='shipping_address_name', insert_after="customer_address",
fetch_from='shipping_address_name.gstin', print_hide=1, length=15), read_only=1,
dict(fieldname='place_of_supply', label='Place of Supply', fetch_from="customer_address.gstin",
fieldtype='Data', insert_after='customer_gstin', print_hide=1,
print_hide=1, read_only=1, length=50), length=15,
dict(fieldname='company_gstin', label='Company GSTIN', ),
fieldtype='Data', insert_after='company_address', dict(
fetch_from='company_address.gstin', print_hide=1, read_only=1, length=15), fieldname="customer_gstin",
label="Customer GSTIN",
fieldtype="Data",
insert_after="shipping_address_name",
fetch_from="shipping_address_name.gstin",
print_hide=1,
length=15,
),
dict(
fieldname="place_of_supply",
label="Place of Supply",
fieldtype="Data",
insert_after="customer_gstin",
print_hide=1,
read_only=1,
length=50,
),
dict(
fieldname="company_gstin",
label="Company GSTIN",
fieldtype="Data",
insert_after="company_address",
fetch_from="company_address.gstin",
print_hide=1,
read_only=1,
length=15,
),
] ]
custom_fields = { custom_fields = {"Quotation": sales_invoice_gst_fields}
'Quotation': sales_invoice_gst_fields
}
create_custom_fields(custom_fields, update=True) create_custom_fields(custom_fields, update=True)