Skip to content

[FIX] shopfloor: Allow to manage supplierinfos on product templates - #989

Open
rousseldenis wants to merge 2 commits into
OCA:16.0from
acsone:16.0-fix-shopfloor-vendor-code-dro
Open

rousseldenis wants to merge 2 commits into
OCA:16.0from
acsone:16.0-fix-shopfloor-vendor-code-dro

Conversation

@rousseldenis

Copy link
Copy Markdown

No description provided.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @sebalix, @guewen, @simahawk,
some modules you are maintaining are being modified, check this out!

@rousseldenis

Copy link
Copy Markdown
Author

@jbaudoux

@rousseldenis rousseldenis added the enhancement New feature or request label Feb 26, 2025
@rousseldenis rousseldenis added this to the 16.0 milestone Feb 26, 2025
Comment thread shopfloor/actions/data.py Outdated
rec.seller_ids.filtered(lambda x: x.product_id == rec)
rec.seller_ids.filtered(
lambda x: x.product_id == rec
or x.product_tmpl_id == rec.product_tmpl_id

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
or x.product_tmpl_id == rec.product_tmpl_id
or (x.product_tmpl_id == rec.product_tmpl_id and not x.product_id)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@jbaudoux Solved

Comment thread shopfloor/actions/data_detail.py Outdated
[("product_id", "=", record.id)]
[
"|",
("product_tmpl_id", "=", record.product_tmpl_id.id),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
("product_tmpl_id", "=", record.product_tmpl_id.id),
"&",
("product_tmpl_id", "=", record.product_tmpl_id.id),
("product_id", "=", False),

Comment thread shopfloor/tests/test_actions_data_base.py Outdated
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 29, 2025
@github-actions github-actions Bot closed this Aug 3, 2025
@rousseldenis rousseldenis reopened this Jan 8, 2026
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @simahawk, @guewen, @sebalix,
some modules you are maintaining are being modified, check this out!

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 11, 2026
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 17, 2026
@jbaudoux

Copy link
Copy Markdown
Contributor

@rousseldenis Can you have a look at the comments?

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 24, 2026
@rousseldenis
rousseldenis force-pushed the 16.0-fix-shopfloor-vendor-code-dro branch from f8025d1 to fb590d9 Compare July 24, 2026 12:58
@rousseldenis

Copy link
Copy Markdown
Author

@jbaudoux Done

Comment thread shopfloor/actions/data.py Outdated
rec.seller_ids.filtered(lambda x: x.product_id == rec)
rec.seller_ids.filtered(
lambda x: x.product_id == rec
or (x.product_tmpl_id == rec.product_tmpl_id)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't it missing a domain to exclude other variants?

Suggested change
or (x.product_tmpl_id == rec.product_tmpl_id)
or (x.product_tmpl_id == rec.product_tmpl_id and not x.product_id)

supplier_info = product.seller_ids.filtered(lambda x: x.product_id == product)
supplier_info = product.seller_ids.filtered(
lambda x: x.product_id == product
or (x.product_tmpl_id == product.product_tmpl_id)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does it makes sens to copy in test the same method that is tested?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't know, I've just adapted test method accordingly

@lmignon

lmignon commented Sep 23, 2026

Copy link
Copy Markdown

ping @rousseldenis

@rousseldenis
rousseldenis force-pushed the 16.0-fix-shopfloor-vendor-code-dro branch from fb590d9 to 79d1390 Compare September 23, 2026 06:58
@rousseldenis

Copy link
Copy Markdown
Author

@jbaudoux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request mod:shopfloor Module shopfloor series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants