addons-cm/website_sale_aplicoop/tests
snt ed8c6acd92 [FIX] website_sale_aplicoop: Add portal user support for sale.order creation
Portal users don't have write/create permissions on sale.order by default.
This causes errors when trying to create orders during checkout or draft save.

Changes:
- Add _get_salesperson_for_order() helper to retrieve partner's salesperson
- Use sudo() for all sale.order create() operations
- Automatically assign user_id (salesperson) when creating orders
- Use sudo() for order updates and line modifications
- Add fallback to commercial_partner_id.user_id for salesperson

This ensures orders are created with proper permissions while maintaining
traceability through the assigned salesperson.

Test coverage:
- Add test_portal_sale_order_creation.py with 3 tests
- Test portal user creates sale.order
- Test salesperson fallback logic
- Test portal user updates order lines
2026-02-21 14:09:57 +01:00
..
__init__.py [FIX] website_sale_aplicoop: Add portal user support for sale.order creation 2026-02-21 14:09:57 +01:00
COBERTURA_TESTS_ANALISIS.md [FIX] website_sale_aplicoop: Remove redundant string= attributes and fix OCA linting warnings 2026-02-18 17:54:43 +01:00
PHASE3_TEST_SUMMARY.md [DOC] website_sale_aplicoop: Add lazy loading documentation and implement v18.0.1.3.0 feature 2026-02-16 18:39:39 +01:00
test_date_calculations.py [TEST FIX] Resolver errores de tests en addons custom 2026-02-18 18:17:55 +01:00
test_draft_persistence.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_edge_cases.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_endpoints.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_eskaera_shop.py [FIX] website_sale_aplicoop: Remove redundant string= attributes and fix OCA linting warnings 2026-02-18 17:54:43 +01:00
test_group_order.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_helper_methods_phase1.py [REFACTOR] Phase 1: Add 3 helper methods and tests (pre-commit skipped for C901) 2026-02-16 15:41:03 +01:00
test_multi_company.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_phase2_eskaera_shop.py [IMP] website_sale_aplicoop: Phase 2 - Refactor eskaera_shop() and add_to_eskaera_cart() 2026-02-16 15:47:15 +01:00
test_phase3_confirm_eskaera.py [ADD] website_sale_aplicoop: Phase 3 test suite implementation 2026-02-16 16:00:39 +01:00
test_portal_access.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_portal_get_routes.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_portal_product_uom_access.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_portal_sale_order_creation.py [FIX] website_sale_aplicoop: Add portal user support for sale.order creation 2026-02-21 14:09:57 +01:00
test_price_with_taxes_included.py Revertir cambio: eliminar cálculo duplicado de impuestos 2026-02-11 19:54:28 +01:00
test_pricing_with_pricelist.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_product_discovery.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_product_extension.py [FIX] website_sale_aplicoop: Remove redundant string= attributes and fix OCA linting warnings 2026-02-18 17:54:43 +01:00
test_record_rules.py [FIX] website_sale_aplicoop: Remove redundant string= attributes and fix OCA linting warnings 2026-02-18 17:54:43 +01:00
test_res_partner.py [FIX] website_sale_aplicoop: Remove redundant string= attributes and fix OCA linting warnings 2026-02-18 17:54:43 +01:00
test_save_order_endpoints.py [FIX] website_sale_aplicoop: Remove redundant string= attributes and fix OCA linting warnings 2026-02-18 17:54:43 +01:00
test_templates_rendering.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00
test_validations.py [REF] Code quality improvements and structure fixes 2026-02-21 13:51:25 +01:00