[10.0] [ADD] purchase_requisition_operating_unit - #81
serpentcs-dev1 wants to merge 7 commits into
Conversation
|
@aheficent Please review code. |
AaronHForgeFlow
left a comment
There was a problem hiding this comment.
Only code review
| and rec.operating_unit_id and\ | ||
| picking_type.warehouse_id.operating_unit_id !=\ | ||
| rec.operating_unit_id: | ||
| raise UserError(_('Configuration error!\nThe Operating \ |
There was a problem hiding this comment.
\n is not need, just close the quotes and open those again in the next line
There was a problem hiding this comment.
@aheficent Removed '\n' and quotes open next line.
Please review code.
| ('warehouse_id.operating_unit_id', '=', | ||
| self.operating_unit_id.id)]) | ||
| if types: | ||
| self.picking_type_id = types[:1] |
There was a problem hiding this comment.
Why don't you use the first?
There was a problem hiding this comment.
@aheficent
[:1] in find first record
There was a problem hiding this comment.
@aheficent
Python slicing in find first value.
b387fe5 to
1196e55
Compare
| "license": "LGPL-3", | ||
| "website": "http://www.eficent.com", | ||
| "category": "Purchase Management", | ||
| "depends": ["purchase_requisition", |
There was a problem hiding this comment.
@aheficent Waiting for #368 to get merged.
I guess then we need to add purchase-workflow to the oca_dependencies, right?
Don't know though why the travis is already green now?!
AaronHForgeFlow
left a comment
There was a problem hiding this comment.
👍 LGTM Thanks. Can you please squash the commits before this is merged?
ff35807 to
d75f0e6
Compare
|
@aheficent squashed commits, Please check it. |
| for rec in self: | ||
| if rec.company_id and rec.operating_unit_id and \ | ||
| rec.company_id != rec.operating_unit_id.company_id: | ||
| raise UserError(_('The Company in the Purchase Requisition and' |
There was a problem hiding this comment.
I'll be great if you include and assertRaises in the test for this one 🏅
|
@aheficent included assertRaises in the test case, Please check it. |
AaronHForgeFlow
left a comment
There was a problem hiding this comment.
@nikul-serpentcs codecov covers 100% of the lines don't know why it's red
0edc0b0 to
c5264af
Compare
|
@aheficent Rebased branch and codecov is Happy. |
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
| and rec.operating_unit_id and\ | ||
| picking_type.warehouse_id.operating_unit_id !=\ | ||
| rec.operating_unit_id: | ||
| raise UserError(_('Configuration error! The Operating ' |
There was a problem hiding this comment.
Can you avoid exclamation marks in the error messages? People may feel bad when getting a message like this
| if types: | ||
| self.picking_type_id = types[:1] | ||
| else: | ||
| raise UserError(_("No Warehouse found with the " |
| and rec.operating_unit_id and\ | ||
| picking_type.warehouse_id.operating_unit_id !=\ | ||
| rec.operating_unit_id: | ||
| raise UserError(_('Configuration error, The Operating ' |
There was a problem hiding this comment.
but the , should be a . @aheficent
There was a problem hiding this comment.
done @mreficent thanks
40e101b to
477a462
Compare
477a462 to
1d7674a
Compare
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
|
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. |
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
[FIX] remove reference to warehouse [ENH] purchase_request_operating_unit, purchase_rquest_procurement_operating_unit 9.0 purchase request operating unit - fixed travis (OCA#81) * [FIX] travis
Purchase Requisition with Operating Units
This module introduces the following features:
Security rules are defined to ensure that users can only see the Purchase Requisition of that Operating Units in which they are allowed access to.
Ensures that Purchase Requisition and the Warehouse in picking type belongs to the same Operating Unit (OU) .
When the user creates a Purchase Order (PO) from the purchase requisition the operating unit is passed to that PO.
Sets default Picking type whoes Operating Unit (OU) in Warehouse matches to that of the User.