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

[16.0][ADD] mrp_bom_produce_delay #1241

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

quentinDupont
Copy link

This module is designed to better respond to the flow of certain users who think about their production time when creating a bill of materials.

It adds Product Delay in BoM, and changes in BoM field will affect Product Produce Delay.

mrp_bom_produce_delay

Copy link

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 Jul 21, 2024
@quentinDupont
Copy link
Author

ping @OCA/manufacturing-maintainers what do you think of this one ?

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 28, 2024
Copy link
Member

@bealdav bealdav left a comment

Choose a reason for hiding this comment

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

String deal

<field name="inherit_id" ref="mrp.mrp_bom_form_view" />
<field name="arch" type="xml">
<xpath expr="//field[@name='product_id']" position="after">
<label for="produce_delay" string="Product Manuf. Lead Time" />
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<label for="produce_delay" string="Product Manuf. Lead Time" />
<label for="produce_delay" string="Lead Time" />

It avoid to have a string split in 2 lines and we know it's about product and manufacture because it's in bom view

Copy link
Author

Choose a reason for hiding this comment

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

Same as 1st comment, i took the term of the core field "produce_delay". But I agree with you that i can change the string

Copy link
Member

Choose a reason for hiding this comment

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

Yes in product form you need string 'Manuf' because there are many purposes but in bom view manufacture vocabulary is implicit, don't repeat yourself, KISS.

class MrpBom(models.Model):
_inherit = "mrp.bom"

produce_delay = fields.Float(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
produce_delay = fields.Float(
lead_time = fields.Float(

delay is "retard" !?

Copy link
Author

@quentinDupont quentinDupont Aug 6, 2024

Choose a reason for hiding this comment

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

produce_delay is the field in MRP in Product model !
I also don't understand it's technical english name (delay is "retard" in FR) but the help message is more clear
That why i take the logic of the core field : https://github.com/odoo/odoo/blob/16.0/addons/mrp/models/product.py#L33

In Inventory tab of Product
image

Copy link
Member

Choose a reason for hiding this comment

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

ok for technical name

Copy link

@hparfr hparfr left a comment

Choose a reason for hiding this comment

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

Can you specify the behaviour when a product as multiple boms (active or not) ?

Copy link
Member

@bealdav bealdav left a comment

Choose a reason for hiding this comment

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

I don't want block, but in case of many boms by product, the behavior could be unexpected for some flows.

On my side, for the same needs I would just use a related readonly field.
But it works as it

@quentinDupont
Copy link
Author

Thanks for your remarks @bealdav and @hparfr, I've detailed it all on last commit :)
Indeed, it works well on single BoM (per product) context !

@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). 🤖

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