Files
odoo_source/addons/purchase_requisition/security/ir.model.access.csv
T
Tiffany Chang (tic) f533e40f0e [IMP] purchase_requisition{_stock}: add new alternative POs option
Previously the "call to tender" flow involved creating a
`purchase.requisition` record, creating each RFQ via that record, and
then manually going through each RFQ to compare the prices/dates/etc.
By linking the "call to tender" POs within the POs, we remove an
unnecessary `purchase.requestion` record and makes it easier to track
which RFQs are related to each other as an Alternative RFQ.

On top of this, we add some comparision features to make it easier to
determine the best RFQ, specificially the ability to compare PO lines in
the same view with some visual aids (best price/date colored green +
buttons to check these lines to make them easier to view). We also add
an extra feature to set the qty of selected/non-chosen PO lines to 0 to
aid in the RFQ selection process (only applies to non-confirmed/done/
cancelled POs).

Some other features included with this:
- option to cancel alternative POs when confirming one, which purposely
  does not cancel ones that have already been confirmed/completed.
- new wizard for creating alternative POs so user can select whether or
  not they want to copy the products/qtys from the original PO.

Important Notes:
- JS Customizations:
  - custom many2many widget added so user:
    - can click between alternative POs in same window + keep breadcrumb.
      This is because all alt POs are interconnected and long breadcrumb
      chain is possible (+ we want to avoid windows within windows.) It
      is expected that user will be aware that unsaved changes will
      auto-save when alt PO is clicked on.
    - cannot unlink a PO from itself (this is automagically done during
      the write) since this will remove all of its linked POs and might
      confuse users.
  - custom view js for Comparing Order Lines to help highlight best
    options, including ensuring that the best options are still
    highlighted after clicking on Choose/Clear buttons (since the best
    option can change afterwards, we recalc + update via RPC)
- General implementation warnings:
  - Anytime any button/alternative PO is clicked on within a PO, the
    form will auto-save. This is due to how the current action service
    handles changing views.
  - POs created via "Create Alternative" button purposely:
     - require a vendor to ensure correct lead times/prices
     - show all vendor/product warnings in wizard because we cannot
       reproduce the pop-up warning that would occur in the PO when
       they are selected. We also purposely block the PO creation when a
       blocking warning is set since we cannot remove the values
       (especially in the case of a blocking vendor message) from a
       newly created PO.
  - Technical purchase.order.group model created to help with difficult
    management of complicated behaviors:
     - unlink from self if a PO is no longer linked to any other POs
     - linkages must be symmetric (i.e. linkage PO1 => PO2 must
       reflect PO2 => PO1 in their form views)
     - don't lose existing linkages (i.e. PO1 => PO2 and PO2 => PO3
       should auto-link PO1 => PO3)
    These last two behaviors are difficult to do without grouping due to
    possibility of remove and adding linkages at the same time. To avoid
    complex code to ensure these complexities hold when when creating a
    new PO, linkaging to alternatives is not allowed when PO is not yet
    saved as a record.

Task: 2695116
Upgrade PR: odoo/upgrade#3586

closes odoo/odoo#87656

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-06-20 12:15:59 +02:00

1.3 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_purchase_requisition_typepurchase.requisition.typemodel_purchase_requisition_typepurchase.group_purchase_user1000
3access_purchase_requisition_type_managerpurchase.requisition.typemodel_purchase_requisition_typepurchase.group_purchase_manager1111
4access_purchase_requisitionpurchase.requisitionmodel_purchase_requisitionpurchase.group_purchase_user1111
5access_purchase_requisition_line_purchase_userpurchase.requisition.linemodel_purchase_requisition_linepurchase.group_purchase_user1111
6access_purchase_requisition_managerpurchase.requisition managermodel_purchase_requisitionpurchase.group_purchase_manager1000
7access_purchase_requisition_line_managerpurchase.requisition.line managermodel_purchase_requisition_linepurchase.group_purchase_manager1000
8access_purchase_requisition_alternative_warningpurchase.requisition.alternative.warningmodel_purchase_requisition_alternative_warningpurchase.group_purchase_user1111
9access_purchase_requisition_create_alternativepurchase.requisition.create.alternativemodel_purchase_requisition_create_alternativepurchase.group_purchase_user1111
10access_purchase_requisition_purchase_order_grouppurchase.order.groupmodel_purchase_order_grouppurchase.group_purchase_user1111