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

[17.0][ADD] stock_picking_state_to_process #162

Open
wants to merge 3 commits into
base: 17.0
Choose a base branch
from

Conversation

DantePereyra
Copy link

@DantePereyra DantePereyra commented Jan 24, 2025

Add a link to show orders in "assigned" or "confirmed" status in "to process".
Add a days field in stock.picking.type, so that when the delay is greater than that, it appears as "very late".

#HT00414

*Edited to change the description according to the functionalities

@DantePereyra
Copy link
Author

@ChristianSantamaria can you review it?

Changes the state of the picking to 'To process (Stock Pending)' when is 'waiting' and 'To process' when is 'assigned' or 'confirmed'.
The button in 'Delivery Orders' shows all 'To Process' pickings.
@DantePereyra DantePereyra force-pushed the 17.0-add-stock_picking_state_to_process branch from e2bb15c to db49da1 Compare January 29, 2025 12:10
@DantePereyra
Copy link
Author

Added the translations with label changes to show new states requiered.
BEFORE:
imagen

AFTER:
imagen

@ChristianSantamaria
Copy link
Contributor

The second commit is very tailored for the client, I think it is better to move it to a private repository or to slv-reports and add it to reports_scl... how do you see it @dalonsod ?

Comment on lines +13 to +20
state = fields.Selection([
('draft', 'Draft'),
('waiting', 'Waiting Another Operation'),
('confirmed', 'Waiting'),
('assigned', 'Ready'),
('done', 'Done'),
('cancel', 'Cancelled'),
])
Copy link
Contributor

Choose a reason for hiding this comment

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

I see, you've simply rewritten state selection definition (in the exactly same way than Odoo does), and it enables us to get and edit translations, doesn't it?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, that way we can manipulate the labels without compromising the logic

Copy link
Contributor

@ChristianSantamaria ChristianSantamaria left a comment

Choose a reason for hiding this comment

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

Some improvements

"author": "Solvos",
"category": "stock",
"license": "LGPL-3",
"website": "https://github.com/solvosci/slv-sale",
Copy link
Contributor

Choose a reason for hiding this comment

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


def get_action_picking_tree_very_late(self):
return self._get_action('stock_picking_state_to_process.action_picking_tree_very_late')

Copy link
Contributor

Choose a reason for hiding this comment

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

EOF end line

@@ -0,0 +1,46 @@
# © 2025 Solvos Consultoría Informática (<http://www.solvos.es>)
# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html
import time
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this dependency necessary if we already have timedelta y date?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it´s used in this domain:
'count_picking_very_late': [('scheduled_date_very_late', '<', time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)), ('state', 'in', ('assigned', 'waiting', 'confirmed'))]
In the line 37

@DantePereyra
Copy link
Author

Improvements done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants