[ADD] website_sale_aplicoop: create picking batches after cutoff

- Add stock_picking_batch dependency to manifest
- Add cutoff date validation in _confirm_linked_sale_orders()
- Create _create_picking_batches_for_sale_orders() method
- Group pickings by consumer_group_id into separate batches
- Set batch scheduled_date from group order pickup_date
- Add test_cron_picking_batch.py with 7 tests covering:
  - Skip orders before cutoff
  - Confirm orders after cutoff
  - Separate batches per consumer group
  - Same group orders in same batch
  - Batch has scheduled_date
  - No duplicate batches on re-run
  - Closed group orders not processed
This commit is contained in:
snt 2026-03-06 15:45:12 +01:00
parent c3173a32c9
commit e2ced75ecd
4 changed files with 455 additions and 11 deletions

View file

@ -1,14 +1,15 @@
# Copyright 2025 Criptomart
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from . import test_group_order
from . import test_res_partner
from . import test_product_extension
from . import test_eskaera_shop
from . import test_templates_rendering
from . import test_record_rules
from . import test_multi_company
from . import test_save_order_endpoints
from . import test_date_calculations
from . import test_pricing_with_pricelist
from . import test_portal_sale_order_creation
from . import test_group_order # noqa: F401
from . import test_res_partner # noqa: F401
from . import test_product_extension # noqa: F401
from . import test_eskaera_shop # noqa: F401
from . import test_templates_rendering # noqa: F401
from . import test_record_rules # noqa: F401
from . import test_multi_company # noqa: F401
from . import test_save_order_endpoints # noqa: F401
from . import test_date_calculations # noqa: F401
from . import test_pricing_with_pricelist # noqa: F401
from . import test_portal_sale_order_creation # noqa: F401
from . import test_cron_picking_batch # noqa: F401