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

[ADD] new module pos_picking_load #183

Merged
merged 2 commits into from
Jul 12, 2017

Conversation

legalsylvain
Copy link
Contributor

Hi all.

This PR add a new module pos_picking_load that allow you to load pickings created by sale module, in the point of sale, to finish the workflow via the point of sale.

new button available
load_picking_01

List of pickings:
load_picking_02

Once the picking is loaded:
load_picking_03

Thanks for your review.

@legalsylvain legalsylvain added this to the 8.0 milestone Jun 21, 2017
},

on_click_picking: function(event){
this.load_picking(parseInt(event.target.parentNode.dataset.pickingId));
Copy link
Contributor

Choose a reason for hiding this comment

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

add a radix:
parseInt(event.target..., 10)

pickingline.innerHTML = pickingline_html;
pickingline = pickingline.childNodes[1];
pickingline.addEventListener('click', this.on_click_picking);
contents.appendChild(pickingline);
Copy link
Contributor

Choose a reason for hiding this comment

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

it's better (for the perfs) if you add all nodes in one DOM call.
you may also add the event listener on the collection instead of each row

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your review, I'll do the changes. About that point, could you point me some samples ?

Copy link
Contributor

Choose a reason for hiding this comment

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

var self = this;
var contents = this.$el[0].querySelector('.picking-list-contents');
contents.innerHTML = "";
for (var i = 0, len = pickings.length; i < len; i++){
Copy link
Contributor

Choose a reason for hiding this comment

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

(just for the sytle: you can use .forEach() or .map() here instead of for loop.
And in javascript the scope delimited by functions and not {})

[IMP] improve JS display for picking list
@StefanRijnhart
Copy link
Member

Dear Sylvain, you are the POS maestro ;-) This module is a great example of how to extend the POS functionality.

I have no code remarks, and I tested the described functionality succesfully. My only gripe is that there is no connection between the original sale order and the new picking anymore. Did you look into linking the new picking to the sale order through the procurement group, or even reuse the existing stock moves if possible, to improve tracking of products? I can propose a change into your branch if you like.

Or in case you think this change can be considered after the merge of this PR, I will give my approval right away.

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

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

Code review and test

@hparfr
Copy link
Contributor

hparfr commented Jul 12, 2017

👍

@legalsylvain
Copy link
Contributor Author

Hi @StefanRijnhart.
Thanks a lot for your compliment !

You're fully right about the lake of connection with the original sale order (forced to 'done') / stock picking (forced to 'canceled') / and stock moves (forced to 'canceled').

The main reasons are :

  • At GRAP, I didn't implemented product tracking. (little shops, without lot management).
  • I really don't know concepts like procurement group. I'm not a stock expert at all. My use is very basic.

But yes, your idea could be a great improvment. We could imagine to overload create_picking (https://github.com/odoo/odoo/blob/8.0/addons/point_of_sale/point_of_sale.py#L830) function if the pos.order come from an existing picking, and altering the original picking (and moves), instead of creating a new one, and cancelling the previous one, and then setting the altered picking to the picking_id field of the pos.order.

As this PR has two 👍, I propose to merge it, and to improve it in another PR.

Please ping me when it's done, so that I'll review it.

@legalsylvain legalsylvain merged commit 027e6f0 into OCA:8.0 Jul 12, 2017
@StefanRijnhart
Copy link
Member

@legalsylvain perfect! I will work in it in the next two weeks or so.

legalsylvain added a commit to legalsylvain/pos that referenced this pull request Oct 26, 2018
[ADD] new module pos_picking_load
legalsylvain added a commit to legalsylvain/pos that referenced this pull request Jan 6, 2019
[ADD] new module pos_picking_load
legalsylvain added a commit to legalsylvain/pos that referenced this pull request Jan 6, 2019
[ADD] new module pos_picking_load
legalsylvain added a commit to legalsylvain/pos that referenced this pull request Jan 6, 2019
[ADD] new module pos_picking_load
legalsylvain added a commit to legalsylvain/pos that referenced this pull request Jan 6, 2019
[ADD] new module pos_picking_load
legalsylvain added a commit to legalsylvain/pos that referenced this pull request Jan 6, 2019
[ADD] new module pos_picking_load
legalsylvain added a commit to legalsylvain/pos that referenced this pull request Jul 5, 2019
[ADD] new module pos_picking_load
legalsylvain added a commit to legalsylvain/pos that referenced this pull request May 5, 2020
[ADD] new module pos_picking_load
legalsylvain added a commit to legalsylvain/pos that referenced this pull request May 5, 2020
[ADD] new module pos_picking_load
legalsylvain added a commit to legalsylvain/pos that referenced this pull request Aug 31, 2020
[ADD] new module pos_picking_load
HeliconiaSolutions pushed a commit to HeliconiaIO/pos that referenced this pull request Nov 27, 2024
[ADD] new module pos_picking_load
HeliconiaSolutions pushed a commit to HeliconiaIO/pos that referenced this pull request Dec 27, 2024
[ADD] new module pos_picking_load
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.

3 participants