Merge lp:~sebastien.beau/e-commerce-addons/oerp6.1-stable-improve-shipping-export into lp:~extra-addons-commiter/e-commerce-addons/oerp6.1-stable
Proposed by
Sébastien BEAU - http://www.akretion.com
Status: | Work in progress |
---|---|
Proposed branch: | lp:~sebastien.beau/e-commerce-addons/oerp6.1-stable-improve-shipping-export |
Merge into: | lp:~extra-addons-commiter/e-commerce-addons/oerp6.1-stable |
Diff against target: |
121 lines (+53/-50) 1 file modified
base_sale_multichannels/sale.py (+53/-50) |
To merge this branch: | bzr merge lp:~sebastien.beau/e-commerce-addons/oerp6.1-stable-improve-shipping-export |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guewen Baconnier @ Camptocamp | Needs Fixing | ||
Review via email: mp+168291@code.launchpad.net |
Description of the change
Improve shipping export by replacing the old try/except by the reporting system. It will help you to debug.
Also export the picking that have empty carrier
To post a comment you must log in.
Unmerged revisions
- 291. By Sébastien BEAU - http://www.akretion.com
-
[FIX] fix shipping export, the continue was lost during the merge
- 290. By Sébastien BEAU - http://www.akretion.com
-
[FIX] export also the picking that have an empty carrier
- 289. By Sébastien BEAU - http://www.akretion.com
-
[IMP] Picking that have already an error in the reporting system are not exported anymore
- 288. By Sébastien BEAU - http://www.akretion.com
-
[REF] split shipping export in smaller function and add repporting system
- 287. By Sébastien BEAU - http://www.akretion.com
-
[REF] change only indentation for preparing the split of the function
- 286. By Sébastien BEAU - http://www.akretion.com
-
[REF] start refactoring the picking export ofr adding reporting system. First step remove try/except no other code change
l.40 s/on error/an error/
When you use a logger, you should not use directly the string substitution like:
40 + external_ session. logger. info("Shipping id %s is skipped as on error already exist"%picking_id)
Instead, you should give the variables as arguments :
40 + external_ session. logger. info("Shipping id %s is skipped as on error already exist", picking_id)
This avoid to process the string substitutions when the logger does not even have to output the line.
You removed the write on `do_not_export` and replaced it by a search in the log reports. Pickings can now be excluded for 2 reasons:
1. they have been excluded by (manually for instance) checking the `do_not_export` field
2. they have a error in the report lines.
For a user, it becomes difficult to find why a picking is not exported. By relying only the field `do_not_export`, with a look on the picking it was obvious that it was not exported.
Opinions?