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

Can't set a default origin for stock pickings when duplicating from Python code #379

Closed
gurneyalex opened this issue Jun 6, 2014 · 1 comment

Comments

@gurneyalex
Copy link
Contributor

https://bugs.launchpad.net/ocb-addons/+bug/1098557

In the Python code of custom addons, it would sometimes be useful to be able to copy a picking while setting the origin field.
For example:

        defaults={'origin': 'test', 'type': 'internal'}
        id = self.pool.get('stock.picking').copy(cr, uid, 1, defaults, context={})

However, in v6.0 and up to the current trunk, the method copy() of stock.picking resets the field "origin" as soon as no default name is set.
I suggest the origin be reset only if it's not passed in the dict of default values.

mart-e pushed a commit that referenced this issue Oct 31, 2014
Allow setting origin/backorder when copying new stock.picking
Fixes #379, lp:1098557
@mart-e
Copy link
Contributor

mart-e commented Oct 31, 2014

Patch merged at 8af9fdf.
Regards

@mart-e mart-e closed this as completed Oct 31, 2014
sebastienbeau pushed a commit to akretion/odoo that referenced this issue Feb 24, 2016
…ntrastat

[FIX] Set l10n_be_intrastat to uninstallable, as it depends on l10n_be
davidtranhp added a commit to davidtranhp/odoo that referenced this issue Jul 3, 2022
…ream_220702_02

Merged from upstream 220702 02
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

2 participants