-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
[9.0] port module delivery_carrier_label_dispatch renamed to delivery_carrier_label_batch #99
[9.0] port module delivery_carrier_label_dispatch renamed to delivery_carrier_label_batch #99
Conversation
@carlosdauden you must be interested. 😄 cc @pedrobaeza |
174ced0
to
175af7d
Compare
domain = self._check_domain(batch_ids) | ||
batchs = batch_obj.search(domain) | ||
batchs.write({'carrier_id': self.carrier_id.id}) | ||
batch_obj.action_set_options(batchs) |
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.
Should be batchs.action_set_options()
instead.
- change name to batch to match with change of `picking_dispatch` name to `stock_batch_picking` - mode description in README.rst - move files in models and views directories - change headers to small license header - use api 8.0 - fix and improve tests
175af7d
to
696a757
Compare
@mdietrichc2c fixed both |
for rec in self: | ||
options_datas = { | ||
'carrier_id': rec.carrier_id.id, | ||
'option_ids': [(6, 0, rec.option_ids)], |
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.
Should be rec.option_ids.ids
Restarted travis as OCA/stock-logistics-workflow#241 was merged |
the field has been renamed in the base module
Thanks @mdietrichc2c for the fix |
de88b58
to
97761c1
Compare
Probably due to usage of multiple environment and cache. datas can't be read from shipping.label but it can be read from ir.attachment
When there is more than 1 pack in a picking, 2 or more thread worker might be in concurrence on the same picking, which makes one of the transaction fails, resulting in the abort of the whole label generation. The solution implemented is to change the way of passing the tasks to the thread workers. Instead of passing a label at a time, we pass a group of label. A group of label actually contains all the labels to generate for one picking.
Inventory report
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.
I guess there were enough changes since the opening of this PR to merge it when travis is green.
import logging | ||
import openerp | ||
import threading | ||
from contextlib import closing, contextmanager |
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.
from contextlib import closing, contextmanager | |
from contextlib import contextmanager |
closing
must be removed to make travis happy
@yvaucher Could you fix travis with @grindtildeath suggestion ? |
label_obj = self.env['shipping.label'] | ||
domain_file_type = ('file_type', '=', f_type) | ||
if not f_type: | ||
domain_file_type = ('file_type', 'in', self.get_file_types()) |
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.
I thought file_type is mandatory, anyhow if f_type=None doesn't this meant that we should search for all files? do we need to call get_file_types here?
fyi in v12 file_type was changed from selection to char field, maybe worth to mention in code when will work on migration and writing tests
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.
There are existing calls to this method IIRC (outside of this module) that are not aware of the file type, so we need to backward-compatible. 👍 to avoid a call to get_file_types()
.
2cdfde5
to
6327ec7
Compare
6327ec7
to
de3ca26
Compare
@rousseldenis done! |
There is a regression with our last two commits. I'm working on it. |
Fixed |
This PR has the |
dda51b7
to
c9ea632
Compare
@rousseldenis the last development have been validated by our customer, I rebased my last 3 commits: it's ready to be merged now |
/ocabot merge |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 251128c. Thanks a lot for contributing to OCA. ❤️ |
picking_dispatch
name tostock_batch_picking
depends on: