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

12.0 mig stock_reserve #637

Closed
wants to merge 87 commits into from
Closed

Conversation

hzh0292
Copy link

@hzh0292 hzh0292 commented Jun 28, 2019

The module stock_reserve_sale depends on this module.

guewen and others added 30 commits June 28, 2019 16:18
…e, added a default 'Reservation Stock' location
…s, onchange not needed as we never change the type. document the fields of a reservation
don't use half the quantity so that the reserved qty is different from
available qty
* check that multiple reservations are handled correctly
* check that various UOM are handled correctly
test that reservations will trigger orderpoint procurements
@rousseldenis rousseldenis added this to the 12.0 milestone Jun 28, 2019
@hzh0292 hzh0292 mentioned this pull request Jun 28, 2019
54 tasks
Copy link
Sponsor Contributor

@rousseldenis rousseldenis 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. Some comments.

Please don't remove translation files

stock_reserve/__init__.py Outdated Show resolved Hide resolved
stock_reserve/__init__.py Outdated Show resolved Hide resolved
stock_reserve/__manifest__.py Outdated Show resolved Hide resolved
stock_reserve/__manifest__.py Outdated Show resolved Hide resolved
stock_reserve/__manifest__.py Outdated Show resolved Hide resolved
stock_reserve/model/__init__.py Outdated Show resolved Hide resolved
stock_reserve/model/product.py Outdated Show resolved Hide resolved
stock_reserve/model/stock_reserve.py Outdated Show resolved Hide resolved
@rven
Copy link

rven commented Jul 15, 2019

The yaml test file needs to be converted to python:
odoo/odoo@cf853a7

@LoisRForgeFlow LoisRForgeFlow changed the title 12.0 mig stock reserve 12.0 mig stock_reserve Jul 17, 2019
Copy link
Sponsor Contributor

@rousseldenis rousseldenis 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. Some changes here


@api.model
def default_get(self, fields_list):
""" Fix default values
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

IMHO this is quite weird to do such kind of things in default_get for a Model.

In which case default field attribute does not work ?

Copy link
Author

Choose a reason for hiding this comment

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

Sorry, that's the old code of version 8.0.So I don't know much detail about the logic case.

@api.onchange('product_uom_qty')
def _onchange_quantity(self):
""" On change of product quantity avoid negative quantities """
if not self.product_id or self.product_uom_qty <= 0.0:
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

You have to use float_compare.

@oca-clabot
Copy link

Hey @hzh0292, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

'security/ir.model.access.csv',
],
'auto_install': False,
'test': ['test/stock_reserve.yml',
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

yml tests are deprecated. Could you convert to xml ?

Copy link
Author

Choose a reason for hiding this comment

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

Yes,it's a problem.Is there somebody can help me to convert the yml to python?

@ventor-dev
Copy link

@hzh0292 , any progress on this migration?

@rousseldenis
Copy link
Sponsor Contributor

@hzh0292

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 30, 2022
@github-actions github-actions bot closed this Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet