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

[12.0] fieldservice_recurring don't create order on confirm #312

Closed
hparfr opened this issue Aug 20, 2019 · 3 comments · Fixed by #315
Closed

[12.0] fieldservice_recurring don't create order on confirm #312

hparfr opened this issue Aug 20, 2019 · 3 comments · Fixed by #315
Labels

Comments

@hparfr
Copy link
Contributor

hparfr commented Aug 20, 2019

I guess it's the same for previous versions, but.

Create a frequency like : Every Monday, weekly.
Create a recurring order with this frequency on Friday, and confirm it.
An order will be created on Friday (datetime.now()).

The date of this order is not compliant with the frequency defined.

I suggest to remove _create_order from action_start and let the cron create the orders.

    def action_start(self):
        for rec in self:
            if not rec.start_date:
                rec.start_date = datetime.now()
            rec._create_order(date=rec.start_date)
            rec.write({'state': 'progress'}

https://github.com/OCA/field-service/blob/12.0/fieldservice_recurring/models/fsm_recurring.py#L101

@brian10048 brian10048 added the bug label Aug 20, 2019
@brian10048
Copy link
Contributor

@hparfr I agree this is an issue.

Could we improve it so that the first order is still created, but with a date that is compliant?

@hparfr
Copy link
Contributor Author

hparfr commented Aug 20, 2019

Why create only one order ?

@brian10048
Copy link
Contributor

I don't see a problem creating all the orders

hparfr added a commit to akretion/field-service that referenced this issue Aug 20, 2019
kongrattapong pushed a commit to ecosoft-odoo/field-service that referenced this issue Aug 21, 2019
kongrattapong pushed a commit to ecosoft-odoo/field-service that referenced this issue Aug 21, 2019
brian10048 pushed a commit to brian10048/field-service that referenced this issue Feb 26, 2020
brian10048 pushed a commit that referenced this issue Jul 18, 2020
Freni-OSI pushed a commit to ursais/field-service that referenced this issue Jan 27, 2021
Freni-OSI pushed a commit to ursais/field-service that referenced this issue Mar 19, 2021
Freni-OSI pushed a commit to ursais/field-service that referenced this issue Apr 15, 2021
brian10048 pushed a commit to brian10048/field-service that referenced this issue Nov 30, 2021
mourad-ehm pushed a commit to akretion/field-service that referenced this issue Jan 27, 2022
Freni-OSI pushed a commit to ursais/field-service that referenced this issue Feb 10, 2022
Freni-OSI pushed a commit to ursais/field-service that referenced this issue Oct 17, 2022
aiendry-aktivsoftware pushed a commit to aiendry-aktivsoftware/field-service that referenced this issue Jun 1, 2023
kaynnan pushed a commit to Escodoo/field-service that referenced this issue Jul 10, 2023
peluko00 pushed a commit to APSL/field-service that referenced this issue Apr 16, 2024
EdgarRetes pushed a commit to ursais/field-service that referenced this issue Oct 15, 2024
EdgarRetes pushed a commit to ursais/field-service that referenced this issue Nov 5, 2024
EdgarRetes pushed a commit to ursais/field-service that referenced this issue Nov 15, 2024
EdgarRetes pushed a commit to ursais/field-service that referenced this issue Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants