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

Use stock_picking.origin as order_number for easier customization (instead of order.name) #13

Open
janbec opened this issue Jan 14, 2022 · 0 comments

Comments

@janbec
Copy link

janbec commented Jan 14, 2022

Hi, it's me again ;)

Currently the sale_order.name is used as a customer reference. For example, if our sale order S0010 is send via sendcloud, the reference S0010 will be passed to e.g. DHL. This will be the reference for parcel on the invoice.

order = self.sale_id
[...]

 if order.name:
            vals.update({"order_number": order.name})
        if self.sendcloud_shipment_uuid:
            vals.update({"shipment_uuid": self.sendcloud_shipment_uuid})
        if total_weight:
            vals.update({"weight": total_weight})
        vals.update({"is_return": is_return})

Github

I think it would be beneficial for many use cases to use stock_picking.origin as the value to pass. This is by default the sale order name but can easily be adjusted by the user in draft state of the picking or can be customized via code.

In our case, we would like to add the cost center to the reference for easier invoice control.

I would appreciate your feedback. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant