Commit Graph
33 Commits
Author SHA1 Message Date
Andrea Grazioso (agr-odoo) 4ffa07a884 [FIX] purchase_product_matrix,sale_product_matrix: not lose warn msg
Set up a DEMO product with
- warning message on sale
- variant
- Order Grid Entry as Sales Variant Selection

Create SO, configure this product

Warning message doesn't display

opw-2442352

closes odoo/odoo#64894

X-original-commit: 50ccbdb983fda289cb9fe740ae711d510386d878
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-01-21 17:57:14 +00:00
Aaron Bohy ce3c743299 [FIX] web, purchase_product_matrix: can open twice the matrix
Let's assume the following scenario with 'purchase_product_matrix'
module installed:
 - create a new Purchase Order
 - add a line in the one2many
 - select "Customizable desk" as product
 - [the desk matrix opens]
 - close the matrix
 - select "Conference chair" instead
 - [the desk matrix opens, whereas it should be the chair one]

It didn't work because of a small bug in the FieldOne2Many. This
field is configured to be reset when any other field in the view
changes. The product configurator feature relies on that. However,
when another field changes, the One2Many didn't update its internal
state with the new record (and it skipped the rendering, which is
fine). The matrix product configurator thus read an obsolete value
in the internal of the one2many.

Since the internal state is now always up-to-date, we can directly
read there the grid information, instead of looking inside other
fields that have been updated (attempt done in [1])

It would be nice to rethink the whole product configurator stuff
in master, to make it more robust, maybe when converting it to owl?

[1] https://github.com/odoo/odoo/commit/21bcafc053be7f80eed7a684fee2dc1e3caaafa5

opw~2421798

closes odoo/odoo#64683

X-original-commit: 69cadbe1be6320d96fe9bc5bf8dd808f87d735c0
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-01-18 12:39:24 +00:00
yhu-odoo 2c5ce41c42 [IMP] uom: change default rounding to two
Change the default rouning digits of all UoMs to be two, also change the
decimal.precision of UoM to be two. Adapt all the tests.
Also to avoid hardcoded digits in `should_consume_qty` widget.

PR #56000

X-original-commit: 460ec0402a2352a5b179d81935f7230f6bc97cb7
2020-09-09 09:21:12 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Anh Thao Pham (pta) 365dc62c93 [FIX] purchase/sale_product_matrix: fix sequence of order lines
- Install Sales and Sale Matrix
- Go to Sales > Configuration > Settings and activate "Variant Grid Entry"
- Go to Products and edit a product with variants (lets call it "Product A"):
  * For "Sales Variant Selection" in "Variants tab", choose "Order Grid Entry"
- Go to Sales > Orders > Quotations and create a quotation
  * Add any product without Variant Selection set to "Order Grid Entry"
  * Add "Product A" with 1 attribute
  * Add any product without Variant Selection set to "Order Grid Entry"
- Here there are 3 products in the quotation with "Product A" at the second position
- Save the quotation
After the save the position of "Product A" is moved to the last position.

In a new quotation, every new order line has a sequence set to 10, except for products
with Variant Selection set to "Order Grid Entry" that set the sequence to the previous one +1,
which will put it in the last position even if another product is added after it.

[All of the above steps and explanations can also be applied to Purchase]

opw-2303096

closes odoo/odoo#55342

X-original-commit: 17c1caec4fefd089586c62c40ac5a2232eed3dcc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-03 15:19:24 +00:00
Anh Thao Pham (pta) 4c35489d47 [FIX] purchase_product_matrix,sale_product_matrix: fix order lines at save
- Go to Sales > Configuration > Settings
- Activate "Variant Grid Entry"
- Go to Products and edit a product with variants (lets call it "Product A")
- For "Sales Variant Selection" in "Variants tab", choose "Order Grid Entry"
- Go to Sales > Orders > Quotations and create a quotation
    * Add any product except "Product A"
    * Add another product except "Product A" and the previous one
    * Switch the 2 added products with the sequence arrow widget.
      It allows to be sure that the 2 added products have 2 different sequences.
    * Add "Product A" with 1 attribute
- Here there are 3 products in the quotation with "Product A" at the third position
- Save the quotation
After the save the position of "Product A" is not the same anymore.

The bug comes from the fact that when using the matrix configurator, no sequence is provided
and the product is added with the default sequence of the SO line which is 10.

The issue is fixed by checking the sequence of the previous SO line if there is one.

[All of the above steps and explanations can also be applied to Purchase]

opw-2221991

closes odoo/odoo#51112

X-original-commit: 1a2d7e3fa0f33d90c74d3fd5a5ef486b56d8f512
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-12 15:04:12 +00:00
Yannick Tivisse 1ba9bef148 [FIX] purchase_product_matrix: Fix product creation from PO line
closes odoo/odoo#49829

Taskid: 2234570
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-21 08:19:20 +00:00
Sébastien Theys ff912bf520 [FIX] *_product_matrix: properly wait edit mode before clicking
Backport of e167f4aeae
And also applied to purchase.

closes odoo/odoo#49802

X-original-commit: e2672f1b60575f03cbbf5d64cf3901ebcc49a2ea
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-04-20 15:16:49 +00:00
Julien Mougenot 48ee7272b6 [IMP] *: adapt qunit suite bundle inheritance
Since the test assets bundle name has been changed and its structure is different,
the inheriting assets need to be updated.

Task 2002399
2020-04-07 14:40:53 +00:00
Romeo Fragomeli ab2e3fdb7d [REF] *: add tour steps utils
This commit moves some step utils in a dedicated file and add new ones.
These steps will be very useful for the Main Flow Tour to avoid
duplicated code.

To do this, we also had to transform it into functions to allow
utils to call each other. Existing one are converted for
standardization purpose.

Note that 'WEBSITE_NEW_PAGE' wasn't considered as an util.
This is a very simple step only used twice.
2020-03-11 10:10:16 +00:00
Yannick Tivisse 4c291e3f70 [IMP] base: Display searchpanel on ir.module.module views
Purpose
=======

The current kanban view is messy. It is difficult to identify which
apps are installed or not. The user can completely miss a module
that might have interested him. A search panel would make things way
more readable.

closes odoo/odoo#44401

Taskid: 2181557
Related: odoo/enterprise#8144
Related: odoo/upgrade#879
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-05 14:03:45 +00:00
mreficent 5c7343c5ce [FIX] purchase_product_matrix: SO->PO typos
closes odoo/odoo#44666

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-05 16:19:47 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Victor Feyens c32e9a4788 [ADD] (*_)_product_matrix: test tours
closes odoo/odoo#40971

X-original-commit: d729460f5fc72aa70e0a024e1dff281299eed0e3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-11-27 15:49:57 +00:00
Victor Feyens 6c80003208 [ADD] purchase_product_matrix: tests
as we cannot do the test in product_matrix, add the purchase equivalent
in purchase_product_matrix to also test the matrix in this case.

X-original-commit: 9d7024a5327939de3c145928782936000d26bd33
2019-11-21 15:31:30 +00:00
Victor Feyens 60c50d16a5 [FIX] *_product_matrix: use correct record for comparison.
X-original-commit: a1d2893f8bdd05ad277b4129932849865a48b1d6
2019-11-21 15:31:30 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
Victor Feyens 07631a5185 [IMP] * : manifest module categories cleanup
closes odoo/odoo#35754

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-25 14:03:45 +00:00
Odoo Translation Bot 974261f7e9 [I18N] Update translation terms from Transifex 2019-09-22 01:19:57 +02:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Martin Trigaux 68c753af55 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#36559

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 08:58:33 +00:00
Odoo Translation Bot 0d51520083 [I18N] Update translation terms from Transifex 2019-09-08 01:29:12 +02:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Victor Feyens 16cf2ec5a2 [IMP] product_matrix: UI 2019-08-29 11:33:36 +00:00
Sébastien Theys 22a11a6f4d [REF] product, *: save product.template.attribute.value on variants
* account, hr_expense, mrp, sale, sale_product_configurator, stock_account,
  website_sale, website_sale_comparison

Before this commit, the `product.attribute.value` were stored on the variants.
This required filtering of attribute lines to find the appropriate matching
`product.template.attribute.value` that were used in most of the business code,
such as when computing the `price_extra`.

This also prevented to have multiple attribute lines for the same attribute,
which is needed to handle use cases such as grape varieties for wine products.
This will be done in the following commit.

After this commit, the combination of `product.template.attribute.value` will be
directly stored on the product variant.

Other changes
=============

Add `combination_indices` on product, which allows to quickly find a variant
matching a combination (1 simple indexed equality query as opposed to 1 query
with as many joins as there are attribute lines), and to add an easy
SQL constraint to ensure active combination uniqueness.

Add active field on `product.template.attribute.line` and
`product.template.attribute.value`, with the same behavior as variants:

They become archived if they can't be unlinked. This allows to keep the database
consistent, such as archived variants correctly keeping all their values, sales
order lines keeping their custom and no_variant. This is done with the help of
`ondelete=restrict` on the corresponding m2m fields, and the `unlink` methods
falling back to archiving when `unlink` is restricted.

Part of task-1912579

PR: #32946
2019-08-26 13:01:13 +00:00
Martin Trigaux b247aa3252 [I18N] *: export saas-12.5 source terms
That will be used a the basis for the future 13.0 version
Without demo data

closes odoo/odoo#36057

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-26 09:38:09 +00:00
Victor Feyens 3c6437710a [IMP] *_product_matrix: UI 2019-08-20 14:02:29 +00:00
Victor Feyens 699a4614ef [FIX] purchase(_product_matrix): no_variant attributes
Display no variant infos in the purchase order line description.

closes odoo/odoo#35717

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-14 10:23:38 +00:00
mreficent 05cec95350 [FIX] purchase_product_matrix: wrong category
closes odoo/odoo#35543

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-07 16:06:12 +00:00
Victor Feyens e6c2975e76 [ADD] (sale/purchase)_product_matrix 2019-08-07 12:50:09 +00:00