Skip to content

[14.0] [ADD] purchase_sale_inter_company: Support returns#653

Closed
thomaspaulb wants to merge 3 commits intoOCA:14.0from
sunflowerit:14.0-10738-support-returns
Closed

[14.0] [ADD] purchase_sale_inter_company: Support returns#653
thomaspaulb wants to merge 3 commits intoOCA:14.0from
sunflowerit:14.0-10738-support-returns

Conversation

@thomaspaulb
Copy link

When a return is actioned on the SO side, also process the return on PO side.

@thomaspaulb thomaspaulb marked this pull request as draft June 29, 2024 17:02
@OCA-git-bot
Copy link
Contributor

Hi @aleuffre, @renda-dev,
some modules you are maintaining are being modified, check this out!

@thomaspaulb thomaspaulb force-pushed the 14.0-10738-support-returns branch from 2eacd7d to 5befa8b Compare June 30, 2024 10:47
@thomaspaulb thomaspaulb marked this pull request as ready for review June 30, 2024 11:32
@thomaspaulb thomaspaulb force-pushed the 14.0-10738-support-returns branch 2 times, most recently from 1863dca to 517f38b Compare June 30, 2024 13:04
@thomaspaulb thomaspaulb force-pushed the 14.0-10738-support-returns branch from 517f38b to dd0b31b Compare August 21, 2024 13:33
Copy link

@christian-ramos-tecnativa christian-ramos-tecnativa left a comment

Choose a reason for hiding this comment

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

Hello @thomaspaulb,
Thanks for your work! Could you please review my comments? I'm working in a multicompany environment where each user only has access to one company. With my suggested changes, everything works perfectly.
Thanks again!

@thomaspaulb thomaspaulb force-pushed the 14.0-10738-support-returns branch 2 times, most recently from 67e665e to e97dad7 Compare September 25, 2024 13:28
Tom Blauwendraat added 2 commits September 25, 2024 15:29
- serial number product combined with regular product
- backorder created on serial number validation
…o rebel module

For product_supplierinfo_inter_company, this introduces a hard requirement to configure
a pricelist on each supplier. This makes the tests of other modules fail because they do
not set these.

For stock_intercompany I don't know why it was set to rebel, it was done before
but not updated in the copier template, so just updating copier to reflect reality.
@thomaspaulb thomaspaulb force-pushed the 14.0-10738-support-returns branch from e97dad7 to 36d06c0 Compare September 25, 2024 13:29
When a return is actioned on the SO side, also process the return on PO side.
@thomaspaulb thomaspaulb force-pushed the 14.0-10738-support-returns branch from 36d06c0 to c398bc0 Compare September 25, 2024 13:31
@thomaspaulb
Copy link
Author

@Christian-RB Done.

Note that in order to solve a number of other bugs I ended up refactoring and simplifying the module:

sunflowerit#8

Still pondering how best to contribute this back to OCA, since it's a whole bunch of stuff, and there's a number of other things that have to be brought from 14.0 to 16.0 as well.

@christian-ramos-tecnativa

I think the best way (To make it easier to review) is splitting the changes in a logical way, by feature or refactor done.

Comment on lines +16 to +23
# dont trigger on returns of incoming pickings
if pick.picking_type_code == "incoming":
return res

# only trigger in case there is a coupled picking on the other side
ic_pick = pick.intercompany_picking_id
if not ic_pick:
return res

Choose a reason for hiding this comment

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

We have been working for a couple of weeks with a customer using this PR and it seems like the return of a return make sense in some cases. Is there any reason why this shouldn't be applied?

Suggested change
# dont trigger on returns of incoming pickings
if pick.picking_type_code == "incoming":
return res
# only trigger in case there is a coupled picking on the other side
ic_pick = pick.intercompany_picking_id
if not ic_pick:
return res
# dont trigger on returns of incoming pickings
if pick.picking_type_code == "incoming" and not pick.intercompany_return_picking_id:
return res
# only trigger in case there is a coupled picking on the other side
ic_pick = pick.intercompany_picking_id or pick.intercompany_return_picking_id
if not ic_pick:
return res

@github-actions
Copy link

github-actions bot commented Feb 2, 2025

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 Feb 2, 2025
@github-actions github-actions bot closed this Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants

Comments