Skip to content

[18.0][ADD] maintenance_purchase_stock: New module#539

Open
christian-ramos-tecnativa wants to merge 2 commits intoOCA:18.0from
Tecnativa:18.0-add-maintenance_purchase_stock
Open

[18.0][ADD] maintenance_purchase_stock: New module#539
christian-ramos-tecnativa wants to merge 2 commits intoOCA:18.0from
Tecnativa:18.0-add-maintenance_purchase_stock

Conversation

@christian-ramos-tecnativa
Copy link
Copy Markdown
Contributor

@christian-ramos-tecnativa christian-ramos-tecnativa commented Dec 31, 2025

@christian-ramos-tecnativa christian-ramos-tecnativa force-pushed the 18.0-add-maintenance_purchase_stock branch from 78f245f to 637d6e3 Compare December 31, 2025 15:41
@dalonsod
Copy link
Copy Markdown
Contributor

dalonsod commented Jan 2, 2026

Hello @christian-ramos-tecnativa only one suggestion: could you consider renaming this addon? At this repo there's already an addon called maintenance_stock, and this new could suggest a link between this one and maintenance_purchase, and this could lead to some confusion, what do you think about it?

@christian-ramos-tecnativa
Copy link
Copy Markdown
Contributor Author

Hi @dalonsod, I see your point. However, in cases like this, users should refer to the module description to understand its purpose. For example, the maintenance_stock module handles consumptions, not a full integration with stock.

@christian-ramos-tecnativa christian-ramos-tecnativa force-pushed the 18.0-add-maintenance_purchase_stock branch 7 times, most recently from 4921d5a to fa08aeb Compare February 3, 2026 15:20
@christian-ramos-tecnativa christian-ramos-tecnativa force-pushed the 18.0-add-maintenance_purchase_stock branch 2 times, most recently from bb07af0 to 0370fa0 Compare February 5, 2026 13:23
@christian-ramos-tecnativa
Copy link
Copy Markdown
Contributor Author

Ready for review/merge

@pedrobaeza pedrobaeza added this to the 18.0 milestone Feb 7, 2026
@api.depends("move_ids.state", "move_ids.product_uom", "move_ids.quantity")
def _compute_qty_received(self):
res = super()._compute_qty_received()
self.order_id._create_equipments()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This shouldn't be done on a computed field, as this computation may be done as a result of a onchange, and later discarded, so please intercept instead write.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants