move to_print_label field to report_label_supermarket module in arbore repo

This commit is contained in:
Luis 2024-12-31 11:59:00 +01:00
parent 661d1452de
commit 59c8d127a9
3 changed files with 6 additions and 15 deletions

View file

@ -44,7 +44,6 @@ class ProductProduct(models.Model):
for product in self:
if product.last_purchase_price_received_compute_type != "manual_update":
product.lst_price = product.theoretical_price
product.to_print_label = True
class ProductPackaging(models.Model):

View file

@ -9,12 +9,12 @@ class ProductTemplate(models.Model):
_inherit = "product.template"
margin_state = fields.Selection(store=True)
to_print_label = fields.Boolean(
string="To print label",
help="""The sale price has been updated on this product
and needs to be updated on the shelf.""",
default=False,
)
# to_print_label = fields.Boolean(
# string="To print label",
# help="""The sale price has been updated on this product
# and needs to be updated on the shelf.""",
# default=False,
# )
last_purchase_price_received = fields.Float(
string="Last purchase price",

View file

@ -11,10 +11,7 @@
<field name="arch" type="xml">
<label for="list_price" position="before">
<field name="last_purchase_price_received" />
<!-- attrs="{'readonly': 1}"-->
<!-- />-->
<field name="last_purchase_price_received_compute_type" />
<field name="to_print_label" />
</label>
</field>
</record>
@ -46,11 +43,6 @@
('margin_state','in', ['too_cheap', 'too_expensive'])
]"
/>
<filter
string="To print"
name="products_ready_to_print_filter"
domain="[('to_print_label', '=', True)]"
/>
<separator />
</xpath>
</field>