-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
Stock ownership availability rules #44
Stock ownership availability rules #44
Conversation
For our purposes, no owner behaves the same way as company owner.
This requires a pre init hook for installation and a create().
d1b4556
to
d226477
Compare
@@ -0,0 +1,7 @@ | |||
Stock Ownership Availability Rules | |||
================================== | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain the purpose of the module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
These tests are not necessary anymore, because the owner of the quant is now required. A separate test to check that default is already in place. Even before, "no owner" and "owned by myself" meant the same thing. The tests were green.
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
{'name': 'Stock Ownership Availability Rules', | ||
'summary': 'XXX', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the entry or provide a meaningful summary?
I wrote this code when the owner of quants was not required, so I needed to handle more cases. Now the logic can be simplified. Moreover, If a location has a partner_id, I use that as a definition of "own" stock.
@gurneyalex you're right with your "side question": if a location has no partner, and no company (neither is required), what can I use as "own" stock? |
@lepistone: sounds good to me. |
👍 |
@@ -0,0 +1,14 @@ | |||
from openerp import models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing header
Apart from missing license header LGTM 👍 |
@yvaucher I added the missing headers. Feel free to merge 😸 |
Thanks |
Stock ownership availability rules
No description provided.