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

[16.0][ADD/IMP] stock_release_channel_shipment_advice*: Add buttons on release channel kanban to print shipments, delivery slip and cash on delivery invoices #863

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

tuantrantg
Copy link
Contributor

@tuantrantg tuantrantg commented Mar 13, 2024

This PR includes:

  • [IMP] stock_release_channel_shipment_advice: Add buttons on release channel kanban to print shipments and delivery slip
  • [ADD] stock_release_channel_shipment_advice_print_cash_on_delivery: Add buttons on release channel kanban to print cash on delivery invoices

Depends on:

@OCA-git-bot
Copy link
Contributor

Hi @jbaudoux,
some modules you are maintaining are being modified, check this out!

@tuantrantg tuantrantg marked this pull request as ready for review March 13, 2024 07:55
@jbaudoux
Copy link
Contributor

ping @rousseldenis @lmignon

@tuantrantg tuantrantg force-pushed the 16.0-imp-stock_release_channel_shipment_advice branch 2 times, most recently from c8a4847 to d6dbf6f Compare March 14, 2024 08:34
Copy link
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

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

Implement is_action_print_shipment_allowed as this:

  • In stock_release_channel: If state == "locked" and shipment_advice_to_print_ids
    • where you define shipment_advice_to_print_ids as last(rec.shipment_advice_ids.filtered(state == done))
  • In stock_release_channel_deliver: if not "auto_deliver", then super() else:
    if state == "delivered" and shipment_advice_to_print_ids
    • where you define shipment_advice_to_print_ids as if not "auto_deliver", then super() else rec.in_release_channel_auto_process.filtered(state == done)

Note: have to add auto_deliver on release channel in module stock_release_channel_deliver (#819)

@cyrilmanuel
Copy link

@tuantrantg little ping, could you take care of this pr ?

@tuantrantg
Copy link
Contributor Author

@tuantrantg little ping, could you take care of this pr ?

I'm a little busy right now, so I'll come back soon to take care of this

@tuantrantg
Copy link
Contributor Author

tuantrantg commented Mar 28, 2024

hi @jbaudoux could you please clarify these points:

where you define shipment_advice_to_print_ids as last(rec.shipment_advice_ids.filtered(state == done))

--> last(rec.shipment_advice_ids.filtered(state == done)): you mean the last done record in shipment_advice_ids, don't you?

where you define shipment_advice_to_print_ids as if not "auto_deliver", then super() else rec.in_release_channel_auto_process.filtered(state == done)

--> in_release_channel_auto_process is a boolean field, could you please recheck this point

@jbaudoux
Copy link
Contributor

jbaudoux commented Mar 28, 2024

hi @jbaudoux could you please clarify these points:

where you define shipment_advice_to_print_ids as last(rec.shipment_advice_ids.filtered(state == done))

--> last(rec.shipment_advice_ids.filtered(state == done)): you mean the last done record in shipment_advice_ids, don't you?

Yes :)
In stock_release_channel_shipment_advice module
Just to implement a simple solution

where you define shipment_advice_to_print_ids as if not "auto_deliver", then super() else rec.in_release_channel_auto_process.filtered(state == done)

--> in_release_channel_auto_process is a boolean field, could you please recheck this point

Sorry it is in_process_shipment_advice_ids which computes based on in_release_channel_auto_process
In stock_release_channel_shipment_advice_deliver module

@tuantrantg tuantrantg force-pushed the 16.0-imp-stock_release_channel_shipment_advice branch from d6dbf6f to 5aa413c Compare March 29, 2024 09:32
@tuantrantg
Copy link
Contributor Author

Implement is_action_print_shipment_allowed as this:

  • In stock_release_channel: If state == "locked" and shipment_advice_to_print_ids

    • where you define shipment_advice_to_print_ids as last(rec.shipment_advice_ids.filtered(state == done))
  • In stock_release_channel_deliver: if not "auto_deliver", then super() else:
    if state == "delivered" and shipment_advice_to_print_ids

    • where you define shipment_advice_to_print_ids as if not "auto_deliver", then super() else rec.in_release_channel_auto_process.filtered(state == done)

Note: have to add auto_deliver on release channel in module stock_release_channel_deliver (#819)

hi @jbaudoux please review this PR and jbaudoux#5 also

Copy link
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

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

LG, thanks

@jbaudoux
Copy link
Contributor

@rousseldenis @lmignon Release channel printing module ported to OCA, as well as cash on delivery

@tuantrantg tuantrantg force-pushed the 16.0-imp-stock_release_channel_shipment_advice branch 2 times, most recently from 463baa7 to 013635f Compare April 8, 2024 09:48
@tuantrantg tuantrantg force-pushed the 16.0-imp-stock_release_channel_shipment_advice branch 3 times, most recently from a51b630 to be77e59 Compare April 20, 2024 06:20
@jbaudoux
Copy link
Contributor

@tuantrantg Don't merge 16.0 branch in your PR but use instead rebase

…hannel kanban to print shipments and delivery slip
…tons on release channel kanban to print cash on delivery invoices
@tuantrantg tuantrantg force-pushed the 16.0-imp-stock_release_channel_shipment_advice branch from 3969af3 to b0bebf5 Compare April 25, 2024 08:13
@jbaudoux
Copy link
Contributor

@dreispt It doesn't need fixing. It's waiting for dependencies to be merged

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 Sep 29, 2024
@jbaudoux jbaudoux added no stale Use this label to prevent the automated stale action from closing this PR/Issue. blocked by dependency and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved blocked by dependency no stale Use this label to prevent the automated stale action from closing this PR/Issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants