Skip to content

Conversation

@tendil
Copy link

@tendil tendil commented Nov 20, 2025

  • Add crm_team_id Many2one field on product.template to store the Sales Team for a product.
  • Extend the product template form view to display the Sales Team field on the General Information tab.
  • Add basic documentation (CONTEXT, DESCRIPTION, USAGE) and a test covering assigning a sales team to a product template.

Task: 5084

@tendil tendil force-pushed the 18.0-t5084-product_sales_team-add_module branch from 1c428c0 to 649b34a Compare November 20, 2025 16:42
@tendil tendil changed the title [ADD] product_sales_team: add module [18.0][ADD] product_sales_team: add module Nov 20, 2025
Copy link
Member

Choose a reason for hiding this comment

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

This is an MD file, it must use markdown format.

@tagged("post_install", "-at_install")
class TestProductSalesTeam(TransactionCase):
def test_set_sales_team_on_product_template(self):
CrmTeam = self.env["crm.team"].create({"name": "Dedicated Team"})
Copy link
Member

Choose a reason for hiding this comment

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

What's the goal of this test? Are we modifying the create() function?

Copy link
Author

Choose a reason for hiding this comment

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

You're right that using create() here is misleading, as it mostly
exercises the core ORM rather than the addon itself

I’ll simplify the test to focus on what this technical module actually
provides: the sales_team_id field on product.template with the
expected Many2one to crm.team

@tendil tendil force-pushed the 18.0-t5084-product_sales_team-add_module branch 2 times, most recently from 90d87a8 to e4713fa Compare November 20, 2025 21:05
@tendil tendil changed the title [18.0][ADD] product_sales_team: add module [18.0][ADD] product_sale_team: add module Nov 20, 2025
@tendil tendil force-pushed the 18.0-t5084-product_sales_team-add_module branch 2 times, most recently from da4e057 to c6dec94 Compare November 20, 2025 21:45
Copy link
Member

@ivs-cetmix ivs-cetmix left a comment

Choose a reason for hiding this comment

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

Code review LGTM

Copy link

@Aldeigja Aldeigja left a comment

Choose a reason for hiding this comment

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

Functional LGTM

@@ -0,0 +1,2 @@
- Open the product
- Select a sales team in the corresponding field located in the "General Settings" tab

Choose a reason for hiding this comment

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

Suggested change
- Select a sales team in the corresponding field located in the "General Settings" tab
- Select a sales team in the corresponding field located in the "General Information" tab

- Add sales_team_id Many2one field on product.template to store
the Sales Team for a product.
- Extend the product template form view to display the Sales Team
field on the General Information tab.
- Add basic documentation (CONTEXT, DESCRIPTION, USAGE) and a test.

Task: 5084
@tendil tendil force-pushed the 18.0-t5084-product_sales_team-add_module branch from c6dec94 to c4cb411 Compare November 23, 2025 22:00
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@ivs-cetmix
Copy link
Member

Hey @OCA/product-maintainers would appreciate your review of this one-field module 😄

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants