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

[9.0] port module delivery_carrier_label_dispatch renamed to delivery_carrier_label_batch #99

Merged

Conversation

yvaucher
Copy link
Member

@yvaucher yvaucher commented Jul 21, 2016

  • 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

depends on:

@rafaelbn
Copy link
Member

@carlosdauden you must be interested. 😄 cc @pedrobaeza

@pedrobaeza pedrobaeza mentioned this pull request Jul 22, 2016
14 tasks
@yvaucher yvaucher changed the title [9.0] port module delivery_carrier_label_dispatch [9.0] port module delivery_carrier_label_dispatch renamed to delivery_carrier_label_batch Jul 22, 2016
@yvaucher yvaucher force-pushed the 9.0-port-delivery_carrier_label_dispatch branch from 174ced0 to 175af7d Compare July 22, 2016 12:25
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)
Copy link
Contributor

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
@yvaucher yvaucher force-pushed the 9.0-port-delivery_carrier_label_dispatch branch from 175af7d to 696a757 Compare August 19, 2016 08:18
@yvaucher
Copy link
Member Author

@mdietrichc2c fixed both

for rec in self:
options_datas = {
'carrier_id': rec.carrier_id.id,
'option_ids': [(6, 0, rec.option_ids)],
Copy link
Contributor

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

@yvaucher
Copy link
Member Author

Restarted travis as OCA/stock-logistics-workflow#241 was merged

@yvaucher
Copy link
Member Author

Thanks @mdietrichc2c for the fix

@guewen guewen force-pushed the 9.0-port-delivery_carrier_label_dispatch branch from de88b58 to 97761c1 Compare April 26, 2017 14:06
mdietrichc2c and others added 8 commits May 1, 2017 11:14
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.
vrenaville pushed a commit to camptocamp/delivery-carrier that referenced this pull request Jul 2, 2018
Copy link
Contributor

@grindtildeath grindtildeath left a 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from contextlib import closing, contextmanager
from contextlib import contextmanager

closing must be removed to make travis happy

@rousseldenis
Copy link
Sponsor Contributor

@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())
Copy link
Member

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

Copy link
Contributor

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().

@rousseldenis rousseldenis added this to the 9.0 milestone Oct 7, 2019
@sebalix sebalix force-pushed the 9.0-port-delivery_carrier_label_dispatch branch from 2cdfde5 to 6327ec7 Compare October 7, 2019 11:33
@rousseldenis
Copy link
Sponsor Contributor

rousseldenis commented Oct 8, 2019

@yvaucher @sebalix Could you remove travis commit as it has been done in a separate PR to keep some formalism ?

@sebalix sebalix force-pushed the 9.0-port-delivery_carrier_label_dispatch branch from 6327ec7 to de3ca26 Compare October 9, 2019 16:00
@sebalix
Copy link
Contributor

sebalix commented Oct 9, 2019

@rousseldenis done!

@sebalix
Copy link
Contributor

sebalix commented Oct 30, 2019

There is a regression with our last two commits. I'm working on it.

@sebalix
Copy link
Contributor

sebalix commented Oct 30, 2019

Fixed

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

@rousseldenis
Copy link
Sponsor Contributor

@yvaucher @sebalix Is this ready ?

@sebalix sebalix force-pushed the 9.0-port-delivery_carrier_label_dispatch branch from dda51b7 to c9ea632 Compare November 4, 2019 08:03
@sebalix
Copy link
Contributor

sebalix commented Nov 4, 2019

@rousseldenis the last development have been validated by our customer, I rebased my last 3 commits: it's ready to be merged now

@rousseldenis
Copy link
Sponsor Contributor

/ocabot merge

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 9.0-ocabot-merge-pr-99-by-rousseldenis-bump-no, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Nov 4, 2019
Signed-off-by rousseldenis
@OCA-git-bot OCA-git-bot merged commit c9ea632 into OCA:9.0 Nov 4, 2019
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 251128c. Thanks a lot for contributing to OCA. ❤️

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.

None yet