-
Notifications
You must be signed in to change notification settings - Fork 42
[16.0][ADD] rma_product_exchange #528
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
base: 16.0
Are you sure you want to change the base?
[16.0][ADD] rma_product_exchange #528
Conversation
5f5ef85 to
d1505d3
Compare
|
For this use case we typically do a sales order free of cost, where we change the product for another. Anyway I think it is interesting to have this use case in the operation and avoid the sales order. |
florian-dacosta
left a comment
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.
I did not test the module yet. It is hard to see if there won't be any issue having a different product in shipping than in RMA.
For the computation of the qty_received field for instance...
I think for a start, there should be a constraint somewhere to ensure that the new product has the same uom_id as the base product of the rma line.
Else I fear we would have quite some bug, starting with this qty computed fields.
|
|
||
| @api.model | ||
| def run(self, procurements, raise_user_error=True): | ||
| if self.env.context.get("rma_item"): |
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.
Is this stuff really usefull ?
You already override rma_make_picking.wizard._get_product() it is enough and you don't need to do this stuff with context, or maybe I am missing something
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.
@florian-dacosta , it's removed.
| class RmaOrderLine(models.Model): | ||
| _inherit = "rma.order.line" | ||
|
|
||
| new_product_id = fields.Many2one( |
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.
Maybe a help here to explain what will happen if the field is set ?
Explain that will impact the shipping
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.
@florian-dacosta , it's done.
| <field name="model">rma.operation</field> | ||
| <field name="inherit_id" ref="rma.rma_operation_form" /> | ||
| <field name="arch" type="xml"> | ||
| <xpath expr="//group[@name='policies']" position="inside"> |
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.
It should be invisible if the delivery_policy is set to "no", because it is only used for delivery, no?
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.
@florian-dacosta , it's fixed.
7a04757 to
d4f09c2
Compare
florian-dacosta
left a comment
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.
One minor comment.
The rest seems ok to me, I'll approve already!
| return values | ||
|
|
||
| @api.model | ||
| def _create_procurement(self, item, picking_type): |
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.
This whole override is useless for now, because rma_item context key is not used anywhere anymore, right ?
In if this the case, please, remove it!
d4f09c2 to
51dea4f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 16.0 #528 +/- ##
==========================================
+ Coverage 81.36% 81.81% +0.44%
==========================================
Files 159 167 +8
Lines 5425 5509 +84
Branches 874 694 -180
==========================================
+ Hits 4414 4507 +93
+ Misses 769 768 -1
+ Partials 242 234 -8
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
|
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. |
This module allows you to ship a product different from the one ordered.
@florian-dacosta , @AaronHForgeFlow