Skip to content

Syncing from upstream Vauxoo/addons-vauxoo (19.0)#369

Merged
bt-admin merged 15 commits into
brain-tec:19.0from
Vauxoo:19.0
Jun 3, 2026
Merged

Syncing from upstream Vauxoo/addons-vauxoo (19.0)#369
bt-admin merged 15 commits into
brain-tec:19.0from
Vauxoo:19.0

Conversation

@bt-admin
Copy link
Copy Markdown

@bt-admin bt-admin commented Jun 3, 2026

bt_gitbot

Jose Suniaga [Vauxoo] and others added 15 commits June 2, 2026 18:13
The approach is to have the USD as the base currency,
so that the sale prices in company currency can be
kept up to date through the exchange rate.

Module features:
- New Cost USD field on the Product form.
- Validate Cost USD so that it is not less than the
  list price of the supplier.
- Avoid save a 'Cost in USD' when product does not has
  assigned a supplier with price in USD.
- Allowed pricelist computation based on Cost in USD.
- Added unit tests to validate constrains and pricelists
  computation.
- Compatibility with module sale_margin.
The Default Pricelist might be modified in other modules
by this reason is not convinient use it in unit tests.
- Rename model files and remove parameters in super
- Rename views files and views IDs
- Change category and fix version in manifest
- Remove headers on files
- Fixing translations
- Fixing code comments on models
- Adding demo data for product_pricelist
- add pre-migration in order to remove fix errors on inherited views of_product_template_tann_inhrt view
Modification to avoid errors coming from the store when listing the
products, due to the fact that the the ID of the record used may
belong to the product.template model, therefore change the iteration
object to the variable `products_qty_partner` to more directly take
the value of the product used in the process
 Fix lint: - (implicit-str-concat)
When the currency of the company is different to USD, the field is shown
with the currency of the company instead of USD, the field is set to be
shown as USD.
The `sale_stock_margin` module recomputes the purchase price in sale
order lines and calls `super()` only over the lines without a stock
move related to it. This causes this module to not recompute the lines
with stock moves related, leading to incorrect computation of the
purchase price.

This commit adds the `sale_stock_margin` module as a dependency in
order to first run this module compute.
Since each company has its own purchase price, we must explicitly set the
company we are working with (the one in the sale order line) to correctly
set the purchase price.
Following the same approach as Odoo [1], the `auto_install` key is
removed because its value is the same as the default.

[1]: odoo/odoo#90209
Changes include:
- Rename `product_uom` to `product_uom_id` in `sale.order.line`
  dependencies and computations according to [1].
- Update `_compute_price_rule` method call and dictionary extraction to
  match the new API signature according to [2].
- Optimize `product.pricelist.item` search by using direct `browse`
  instead of filtering `item_ids`.
- Create test records (Partner, Product, Pricelist) dynamically as demo
  data is no longer loaded by default.
- Set `price_discount` to `-15` in the test pricelist to comply with
  Odoo's native markup calculation standard.
- Replace usage of the deprecated `price` field on product templates with
  `get_contextual_price()` according to [3].
- Replace usage of the deprecated `pricing` div on product template
  views with `list_price_uom` according to [4].
- Deprecate the usage of `invisible` in views according to [5].
- Removed deprecated inheritance in `product.pricelist` as it was causing
  silent fallbacks to `list_price`, breaking margin computations in
  sales orders.
- Injected the raw USD cost directly via the official `_compute_base_price`
  hook in `product.pricelist.item`.
- Added native support for UoM (Unit of Measure) conversions.
- Grant `product.group_product_pricelist` explicitly in tests because
  demo data is no longer loaded by default, removing the implicit
  activation that previously made pricelist_id visible in the Form.

[1]: odoo/odoo@c8461a5
[2]: odoo/odoo@57ced81
[3]: odoo/odoo@9e99a9d
[4]: odoo/odoo@65652c7
[5]: odoo/odoo#137031
@bt-admin bt-admin added the 19.0 label Jun 3, 2026
@bt-admin bt-admin merged commit 4e321b2 into brain-tec:19.0 Jun 3, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants