style: format code with black

This commit is contained in:
Ankush Menat
2022-03-28 18:52:46 +05:30
parent 21e00da3d6
commit 494bd9ef78
1395 changed files with 91704 additions and 62532 deletions

View File

@@ -2,7 +2,6 @@
# License: GNU General Public License v3. See license.txt
def set_print_templates_for_item_table(doc, settings):
doc.print_templates = {
"items": "templates/print_formats/includes/items.html",
@@ -20,16 +19,21 @@ def set_print_templates_for_item_table(doc, settings):
doc.flags.compact_item_fields = ["description", "qty", "rate", "amount"]
if settings.compact_item_print:
doc.child_print_templates["items"]["description"] =\
"templates/print_formats/includes/item_table_description.html"
doc.child_print_templates["items"][
"description"
] = "templates/print_formats/includes/item_table_description.html"
doc.flags.format_columns = format_columns
def set_print_templates_for_taxes(doc, settings):
doc.flags.show_inclusive_tax_in_print = doc.is_inclusive_tax()
doc.print_templates.update({
"total": "templates/print_formats/includes/total.html",
"taxes": "templates/print_formats/includes/taxes.html"
})
doc.print_templates.update(
{
"total": "templates/print_formats/includes/total.html",
"taxes": "templates/print_formats/includes/taxes.html",
}
)
def format_columns(display_columns, compact_fields):
compact_fields = compact_fields + ["image", "item_code", "item_name"]