Skip to content

Conversation

@mihien
Copy link

@mihien mihien commented Jan 26, 2026

Description

Add an option in the point of sale settings to indicate whether, when we scan a product barcode, the taxes are included or not.

Copy link

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mihien. Thanks for your contribution. could you update the CONFIGURE section. A I think this option is a little obscure, so, I could be great to explain the use case when it's not the list_price field.

thanks !

Comment on lines 9 to 10
_name = "res.company"
_inherit = ["res.company"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_name = "res.company"
_inherit = ["res.company"]
_inherit = "res.company"

is enough

price_to_weight_price_field_id = fields.Many2one(
string="Price To Weight Field",
comodel_name="ir.model.fields",
domain=[("model", "=", "product.product"), ("ttype", "=", "float")],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicking : is it possible to filter monetary field only ?

@mihien mihien force-pushed the 16.0-imp-pos_price_to_weight branch 2 times, most recently from 1b20e1a to 2cec9eb Compare January 27, 2026 15:13
@mihien
Copy link
Author

mihien commented Jan 27, 2026

@legalsylvain Hi Sylvain! I've rewritten my changes, as the goal was to be able to chose whether the taxes are included in the product's barcode or not. But I missed the fact that the prices with and without taxes are not fields of the product model in 16.0 anymore.

/*
Copyright (C) 2024 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please git mv to make easy the review of the diff !

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are too many changes to the file when converting to es and even with git mv when we make too many changes + rename the file there is no way (or at least none that I've found) to have git detect it as changes to one file. So I've separated the renaming and the conversion into two different commits

_name = "res.company"
_inherit = "res.company"

is_price_to_weight_with_VAT = fields.Boolean(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default =True

@mihien mihien force-pushed the 16.0-imp-pos_price_to_weight branch from 2cec9eb to 97cfab9 Compare January 29, 2026 09:35
@mihien mihien force-pushed the 16.0-imp-pos_price_to_weight branch from 97cfab9 to 140bfbf Compare January 29, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants