- Renombrar README.md a README_DEV.md en todos los addons custom - Crear README.rst siguiendo estructura OCA oficial - Crear directorios readme/ con fragmentos .rst (DESCRIPTION, INSTALL, CONFIGURE, USAGE, CONTRIBUTORS, CREDITS) - Actualizar créditos: Criptomart (autor) + Elika Bilbo (financiador) - Actualizar __manifest__.py con maintainers correctos - Crear estructura static/description/ para logo en 5 addons - Agregar documentación de logo (LOGO_INSTRUCTIONS.md, install_logo.sh) - Actualizar copilot-instructions.md con referencias a OCA_DOCUMENTATION.md - Crear docs/OCA_DOCUMENTATION.md con guía completa de estructura - Crear docs/RESUMEN_CAMBIOS_DOCUMENTACION.md con resumen detallado Addons actualizados: - website_sale_aplicoop - product_sale_price_from_pricelist - product_pricelist_total_margin - product_price_category_supplier - account_invoice_triple_discount_readonly
31 lines
1.3 KiB
ReStructuredText
31 lines
1.3 KiB
ReStructuredText
This module fixes a bug in ``account_invoice_triple_discount`` when combined with ``purchase_triple_discount``.
|
|
|
|
**Problem Solved:**
|
|
|
|
In purchase orders, when configuring discounts in the ``discount2`` or ``discount3`` columns:
|
|
|
|
* Upon saving, all discounts were accumulated in the ``discount1`` column
|
|
* The ``discount2`` and ``discount3`` fields were reset to zero
|
|
* This occurred because the original mixin's ``write`` method always reset these fields
|
|
|
|
**Solution:**
|
|
|
|
The module overrides the ``write`` method of ``triple.discount.mixin`` to:
|
|
|
|
#. Detect if ``discount1``, ``discount2`` or ``discount3`` are being explicitly modified
|
|
#. If there are explicit discounts, ignore the computed ``discount`` field
|
|
#. If only the ``discount`` field comes, maintain legacy behavior
|
|
#. Make the total ``discount`` field readonly in relevant views
|
|
|
|
**Additional Features:**
|
|
|
|
* Makes the ``discount`` field (total discount) **readonly** in:
|
|
|
|
* Partner form view (``res.partner``)
|
|
* Supplier info in product form (``product.supplierinfo``)
|
|
* Purchase order lines (``purchase.order.line``)
|
|
* Account move lines (``account.move.line``)
|
|
* Base mixin (``triple.discount.mixin``)
|
|
|
|
* Forces users to work only with the ``discount1``, ``discount2`` and ``discount3`` columns
|
|
* Avoids confusion between computed total and individual discounts
|