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

[WIP][DO NOT MERGE][13.0] Add sale_warehouse_calendar #1696

Closed

Conversation

mmequignon
Copy link
Member

@mmequignon mmequignon commented Aug 13, 2021

⚠️
Work in progress
Needs fixing
Do not merge

Computes sale order lead times with respect to to Warehouse calendar

@OCA-git-bot
Copy link
Contributor

Hi @mmequignon! Thank you very much for this contribution. As the addon you are improving does not have a declared maintainer, I take the opportunity to mention that you can consider adopting it. To do so, please read the maintainer role description, and, if interested, create a pull request to add your GitHub login to the maintainers key of the addon manifest.

@mmequignon mmequignon force-pushed the 13.0-add-sale-warehouse-calendar branch 4 times, most recently from cd70f9a to 03c0210 Compare September 13, 2021 11:34
@mmequignon mmequignon changed the title [WIP][13.0] add sale warehouse calendar [13.0] add sale warehouse calendar Sep 13, 2021
sale_warehouse_calendar/tests/test_sale_order_dates.py Outdated Show resolved Hide resolved
sale_warehouse_calendar/tests/test_sale_order_dates.py Outdated Show resolved Hide resolved
sale_warehouse_calendar/models/sale_order_line.py Outdated Show resolved Hide resolved
sale_warehouse_calendar/models/sale_order_line.py Outdated Show resolved Hide resolved
Copy link
Contributor

@sebalix sebalix left a comment

Choose a reason for hiding this comment

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

Pre-approving, one small comment

- stage: test
env:
- TESTS="1" ODOO_REPO="OCA/OCB"
- TESTS="1" ODOO_REPO="OCA/OCB" EXCLUDE="sale_warehouse_calendar"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment about the conflicting module?

Copy link
Member Author

Choose a reason for hiding this comment

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

done in the doc.

Copy link
Contributor

@simahawk simahawk Sep 21, 2021

Choose a reason for hiding this comment

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

are you sure you are running your tests w/ these settings?

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.

There is likely an error in the computation of the date planned

sale_warehouse_calendar/models/sale_order_line.py Outdated Show resolved Hide resolved
sale_warehouse_calendar/models/sale_order_line.py Outdated Show resolved Hide resolved
sale_warehouse_calendar/readme/DESCRIPTION.rst Outdated Show resolved Hide resolved
sale_warehouse_calendar/tests/test_sale_order_dates.py Outdated Show resolved Hide resolved
sale_warehouse_calendar/tests/test_sale_order_dates.py Outdated Show resolved Hide resolved
sale_warehouse_calendar/__manifest__.py Outdated Show resolved Hide resolved
@mmequignon mmequignon force-pushed the 13.0-add-sale-warehouse-calendar branch 2 times, most recently from 18f61c7 to f320d38 Compare September 20, 2021 14:27
@simahawk simahawk changed the title [13.0] add sale warehouse calendar [13.0] Add sale_warehouse_calendar Sep 21, 2021
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.

Thanks for the comments. Code is very understandable

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

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

check the tests pls

- stage: test
env:
- TESTS="1" ODOO_REPO="OCA/OCB"
- TESTS="1" ODOO_REPO="OCA/OCB" EXCLUDE="sale_warehouse_calendar"
Copy link
Contributor

@simahawk simahawk Sep 21, 2021

Choose a reason for hiding this comment

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

are you sure you are running your tests w/ these settings?

sale_warehouse_calendar/models/sale_order_line.py Outdated Show resolved Hide resolved
@mmequignon mmequignon force-pushed the 13.0-add-sale-warehouse-calendar branch from f320d38 to c571fdb Compare September 21, 2021 11:22
DDMRP is broken when a calendar is set on the warehouse.
We need to be able to set a calendar whithout breaking DDMRP.
Remove this commit when DDMRP is fixed.
@mmequignon
Copy link
Member Author

Do not merge this (see the last commit description)

@mmequignon mmequignon changed the title [13.0] Add sale_warehouse_calendar [WIP][DO NOT MERGE][13.0] Add sale_warehouse_calendar Oct 14, 2021
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.

This last commit is not fixing the hours issue in the right way.
If calendar plan_day is hours aware, then it should be fixed just before the call to that method.

@@ -41,6 +41,11 @@ def _sale_warehouse_calendar_expected_date(self, expected_date):
)
# add back the security lead
expected_date += td_security_lead
# This should be the delivery date.
# It is up to the carrier to determine the hour with the customer
expected_date = expected_date.replace(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not TZ compliant and won't work for countries in UTC-X.
I would not change the hours here. If this is necessary in a later calendar computation, it is there that it should be fixed.

workload_days, date_planned, compute_leaves=True
)
res["date_planned"] = date_planned.replace(
Copy link
Contributor

Choose a reason for hiding this comment

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

Same remark as above

@github-actions
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 Aug 27, 2023
@github-actions github-actions bot closed this Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs fixing stale PR/Issue without recent activity, it'll be soon closed automatically. work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants