-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
[15.0][ADD] stock_picking_delivery_label_link: New module #892
base: 15.0
Are you sure you want to change the base?
Conversation
a168ff6
to
fbf4287
Compare
There is a way to identify shipping label since a long time https://github.com/OCA/delivery-carrier/blob/16.0/base_delivery_carrier_label/models/shipping_label.py I believe the |
@florian-dacosta not in this stable version... |
@pedrobaeza Sure, but I was wondering if something similar could be done instead of doing it differently ? I don't know what is feasible on your side, I am just wondering if we could avoid having, at term, 2 concurrent modules... |
We can converge in 18 if that ugly module is split. |
Hi @florian-dacosta precisely the intention here is to avoid pulling new deps into the current modules. For the future, a base module could add a hook, maybe a filed, and not much more IMO... for that |
fbf4287
to
0411f62
Compare
Well we agree about the current state of The approach is totally different. Let's say we extract the Maybe the approach to have a many2many field is best and should be kept, and we'll then have to migrate from Do you think the many2many approach is best and why? I mean, if I start a work to extract the |
For me, bloating the DB schema with more and more models for something so simple as an attachment is not the correct approach. |
Well anyway, it is nice to try to make the module work on its own, independently of any code in the carrier specific module. But it is not reliable enough for now. Indeed, during the call to I think we should at least implement something to be able to bypass the current way to compute these shipping labels so the specific carrier impl modules could override it and compute it their own way if needed. For instance :
So that the specific carrier implementation module, if we know we are in the case I described (send_to_shipper generate not-label documents), I could depend on this module and implement :
And then implement its own logic to fill the I am way more in favor of having one or multiple simple dependencies that are kind of required for all carrier specific impl like this module or I would also hide the |
comodel_name="ir.attachment", | ||
compute="_compute_allowed_shipping_attachement_ids", | ||
) | ||
shipping_label_ids = fields.Many2many( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you choose a many2many and not a one2many ?
What is your use case when the same attachment is attached on different pickings ?
cc @sergio-teruel @Tecnativa TT51077