Skip to content

Commit 5139d6e

Browse files
committed
FIX: Apply pre-commit formatting
1 parent 9ed9ba8 commit 5139d6e

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

sale_order_add_byproduct/models/mrp_production.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _add_byproducts_to_sale_order(self):
102102
)
103103
else:
104104
# Get the template from the config parameter
105-
config_settings = self.env['res.config.settings'].create({})
105+
config_settings = self.env["res.config.settings"].create({})
106106
note_template = config_settings.get_byproduct_note_template()
107107
if note_template:
108108
note = note_template.format(

sale_order_add_byproduct/models/res_config_settings.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,19 @@ class ResConfigSettings(models.TransientModel):
1515

1616
def get_byproduct_note_template(self):
1717
"""Get the byproduct note template from config parameters."""
18-
return self.env['ir.config_parameter'].sudo().get_param(
19-
'sale_order_add_byproduct.byproduct_note_template',
20-
'{product_name} (By-product from MO: {mo_name})'
18+
return (
19+
self.env["ir.config_parameter"]
20+
.sudo()
21+
.get_param(
22+
"sale_order_add_byproduct.byproduct_note_template",
23+
"{product_name} (By-product from MO: {mo_name})",
24+
)
2125
)
2226

2327
def set_byproduct_note_template(self):
2428
"""Set the byproduct note template in config parameters."""
2529
if self.byproduct_note_template is not False: # Check for False specifically
26-
self.env['ir.config_parameter'].sudo().set_param(
27-
'sale_order_add_byproduct.byproduct_note_template',
28-
self.byproduct_note_template or ''
30+
self.env["ir.config_parameter"].sudo().set_param(
31+
"sale_order_add_byproduct.byproduct_note_template",
32+
self.byproduct_note_template or "",
2933
)

0 commit comments

Comments
 (0)