Skip to content

Commit

Permalink
[FIX] sale_discount_display_amount: field attributes
Browse files Browse the repository at this point in the history
Replace non-existent `name` and `Name` attributes in field declarations
to `string`.
  • Loading branch information
maciej-wichowski committed Sep 12, 2024
1 parent a9b1de8 commit 3e50acf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion sale_discount_display_amount/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
class ResCompany(models.Model):
_inherit = "res.company"

display_discount_with_tax = fields.Boolean(Name="Show the Discount with TAX")
display_discount_with_tax = fields.Boolean(string="Show the Discount with TAX")
2 changes: 1 addition & 1 deletion sale_discount_display_amount/models/res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

display_discount_with_tax = fields.Boolean(
Name="Show the Discount with TAX",
string="Show the Discount with TAX",
help="Check this field to show the Discount with TAX",
related="company_id.display_discount_with_tax",
readonly=False,
Expand Down
10 changes: 5 additions & 5 deletions sale_discount_display_amount/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ class SaleOrder(models.Model):
_inherit = "sale.order"

display_discount_with_tax = fields.Boolean(
name="Show the Discount with TAX",
string="Show the Discount with TAX",
help="Check this field to show the Discount with TAX",
related="company_id.display_discount_with_tax",
)
discount_total = fields.Monetary(
compute="_compute_discount_total",
name="Discount total",
string="Discount total",
currency_field="currency_id",
store=True,
)
discount_subtotal = fields.Monetary(
compute="_compute_discount_total",
name="Discount Subtotal",
string="Discount Subtotal",
currency_field="currency_id",
store=True,
)
price_subtotal_no_discount = fields.Monetary(
compute="_compute_discount_total",
name="Subtotal Without Discount",
string="Subtotal Without Discount",
currency_field="currency_id",
store=True,
)
price_total_no_discount = fields.Monetary(
compute="_compute_discount_total",
name="Total Without Discount",
string="Total Without Discount",
currency_field="currency_id",
store=True,
)
Expand Down
8 changes: 4 additions & 4 deletions sale_discount_display_amount/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ class SaleOrderLine(models.Model):

discount_total = fields.Monetary(
compute="_compute_amount",
Name="Discount Subtotal",
string="Discount Subtotal",
store=True,
precompute=True,
)
discount_subtotal = fields.Monetary(
compute="_compute_amount",
Name="Discount Subtotal",
string="Discount Subtotal",
store=True,
precompute=True,
)
price_subtotal_no_discount = fields.Monetary(
compute="_compute_amount",
Name="Subtotal Without Discount",
string="Subtotal Without Discount",
store=True,
precompute=True,
)
price_total_no_discount = fields.Monetary(
compute="_compute_amount",
Name="Total Without Discount",
string="Total Without Discount",
store=True,
precompute=True,
)
Expand Down

0 comments on commit 3e50acf

Please sign in to comment.