Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] product: barcode should not disappear in template when archiving a product #34769

Conversation

parthchoksi-github
Copy link

@parthchoksi-github parthchoksi-github commented Jul 11, 2019

Barcode field disappears in template(product.template) when you archive the same record from product('product.product')'

Here we are making sure that even when a product is archived, its barcode is still visible in template.
We had to change barcode from a related field to a computed field.

Task- https://www.odoo.com/web#id=1978559&action=333&active_id=966&model=project.task&view_type=form&menu_id=4720

Pad- https://pad.odoo.com/p/r.1118e013e6c395157a91b17029dcea74

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@parthchoksi-github parthchoksi-github changed the title [IMP] product: changed barcode from related to compute [IMP] product: barcode should not disappear in template when archiving a product Jul 11, 2019
@parthchoksi-github parthchoksi-github force-pushed the master-product-make-barcode-compute-pch branch 2 times, most recently from 4de39fd to 28f00a2 Compare July 11, 2019 06:50
@C3POdoo C3POdoo added the RD research & development, internal work label Jul 11, 2019
@parthchoksi-github parthchoksi-github force-pushed the master-product-make-barcode-compute-pch branch from 28f00a2 to 0d2fd51 Compare July 11, 2019 07:08
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Jul 11, 2019
@parthchoksi-github parthchoksi-github force-pushed the master-product-make-barcode-compute-pch branch from 0d2fd51 to 65b1a58 Compare July 18, 2019 07:31
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Jul 18, 2019
@gustavovalverde
Copy link
Contributor

Oh, this was not merged in v13 :( cc: @nim-odoo

@Whenrow Whenrow force-pushed the master-product-make-barcode-compute-pch branch from 65b1a58 to 1437996 Compare December 19, 2019 15:26
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Dec 19, 2019
@Whenrow Whenrow force-pushed the master-product-make-barcode-compute-pch branch from 1437996 to 820e17a Compare December 19, 2019 15:47
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Dec 19, 2019
@Whenrow Whenrow force-pushed the master-product-make-barcode-compute-pch branch from 820e17a to 8b1e4a0 Compare December 20, 2019 10:56
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Dec 20, 2019
@Whenrow Whenrow force-pushed the master-product-make-barcode-compute-pch branch from 8b1e4a0 to 6df44ed Compare February 4, 2020 09:03
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Feb 4, 2020
@Whenrow Whenrow force-pushed the master-product-make-barcode-compute-pch branch from 6df44ed to 67f8c17 Compare February 4, 2020 09:54
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Feb 4, 2020
Parth Choksi and others added 2 commits March 10, 2020 14:56
Before this commit when a user archives the product, the barcode
field in its template used to get disappeared.

Since barcode field in template is a related field to product,
the field gets invisible in product template when the user archives
the related product.

After this commit, even when a product is archived,
its barcode will still be visible in template.

Here the barcode field is changed from related to computed.

task-1978559
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants
@sle-odoo sle-odoo force-pushed the master-product-make-barcode-compute-pch branch from 67f8c17 to ee6ddfc Compare March 10, 2020 14:53
@robodoo robodoo removed the CI 🤖 Robodoo has seen passing statuses label Mar 10, 2020
@sle-odoo
Copy link
Contributor

robodoo r+ rebase-ff

@robodoo
Copy link
Contributor

robodoo commented Mar 10, 2020

Merge method set to rebase and fast-forward

@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Mar 10, 2020
robodoo pushed a commit that referenced this pull request Mar 10, 2020
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants

closes #34769

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
@robodoo robodoo closed this Mar 10, 2020
@robodoo robodoo temporarily deployed to merge March 10, 2020 15:56 Inactive
@fw-bot fw-bot deleted the master-product-make-barcode-compute-pch branch March 24, 2020 16:46
nle-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Apr 22, 2020
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants

saas-12.3 backport of odoo#34769

note: saas-13.3 commit f36d0ce backported because the issue was
solved differently in 13.0 a266ff5 but it's better to have the same
code accross all version.

opw-2226294
closes odoo#49906
nle-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Apr 22, 2020
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants

saas-13.2 backport of odoo#34769

note: saas-13.3 commit f36d0ce backported because the issue was
solved differently in 13.0 a266ff5 but it's better to have the same
code accross all version.

opw-2226294
closes odoo#49888
robodoo pushed a commit that referenced this pull request Apr 22, 2020
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants

saas-12.3 backport of #34769

note: saas-13.3 commit f36d0ce backported because the issue was
solved differently in 13.0 a266ff5 but it's better to have the same
code accross all version.

opw-2226294
closes #49906

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
robodoo pushed a commit that referenced this pull request Apr 22, 2020
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants

saas-13.2 backport of #34769

note: saas-13.3 commit f36d0ce backported because the issue was
solved differently in 13.0 a266ff5 but it's better to have the same
code accross all version.

opw-2226294
closes #49888

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
fw-bot pushed a commit to odoo-dev/odoo that referenced this pull request Apr 22, 2020
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants

saas-13.2 backport of odoo#34769

note: saas-13.3 commit f36d0ce backported because the issue was
solved differently in 13.0 a266ff5 but it's better to have the same
code accross all version.

opw-2226294
closes odoo#49888

X-original-commit: b83da36
nle-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Apr 22, 2020
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants

saas-12.3 backport of odoo#34769

note: saas-13.3 commit f36d0ce backported because the issue was
solved differently in 13.0 a266ff5 but it's better to have the same
code accross all version.

opw-2226294
closes odoo#49906

X-original-commit: c2f86f6
robodoo pushed a commit that referenced this pull request Apr 22, 2020
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants

saas-12.3 backport of #34769

note: saas-13.3 commit f36d0ce backported because the issue was
solved differently in 13.0 a266ff5 but it's better to have the same
code accross all version.

opw-2226294
closes #49906

closes #49929

X-original-commit: c2f86f6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
immontilla pushed a commit to immontilla/odoo that referenced this pull request Apr 26, 2020
Steps to reproduce:
  * Create a template with 2 variants
  * Archive one variant
  * Unarchive this same variant

--> the template is archived
This is due to commit 6a13b56. If the
variant is the only one, toggle_active on the variant should be
reflected on the template. The issue is that toggle active do not count
archived variant. One active variant and one archived variant are
counted as 1.
This commit make toggle_active count all variants

saas-12.3 backport of odoo#34769

note: saas-13.3 commit f36d0ce backported because the issue was
solved differently in 13.0 a266ff5 but it's better to have the same
code accross all version.

opw-2226294
closes odoo#49906

closes odoo#49929

X-original-commit: c2f86f6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants