Commit Graph
82 Commits
Author SHA1 Message Date
MerlinGuillaume 86959e5865 [FIX] purchase_requisition_stock: alternative's RFQ delivery address
When generating an alternative request for quotation from a dropship
purchase, the delivery address is not copied

Steps to reproduce:
1. Install Sales and stock_dropshipping module
2. Go to Settings > General Settings > Users > Manage Users, open user
Mitchell Admin and in the Access Rights tab enable 'Manage Multiple
Stock Locations'
3. Go to Settings > Sales > Quotations & Orders and enable Customer
Addresses
4. Go to Settings > Purchase > Orders and enable Purchase Agreements
5. Go to Sales > Products > Products and edit a product (e.g. 'Acoustic
Bloc Screens')
- In the Inventory tab enable routes 'Buy' and 'Dropship'
6. Create a Sale Order for this product with a different Delivery
Address then the Customer and confirm it
7. Go to the purchase order
8. In the Alternatives tab create an alternative
9. The Dropship Address is not repercuted on the new RFQ

Solution:
Add a method `_get_alternative_values` which sets the dest_address_id
and is extended in `purchase_requisition_stock` to add the
picking_type_id

opw-2880042

closes odoo/odoo#94109

X-original-commit: a7ef5d93650c262497d3a02b934284829cfc5021
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-06-29 12:19:15 +02:00
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
Fabien Pinckaers ff110b0ed8 [IMP] purchase_requisition: blanket orders and usability cleaning
Improved usability & code cleaning:
  - Support for blanket orders, in addition of purchase tenders
    ("Purchase Agreements")
  - Create a RfQ in one click, no wizard anymore
  - Control of quantities really purchased
  - Better control of side-effects thanks to purchase requisition types
  - JS code removed (not necessary)
  - Workflow removed

Closes #11666
2016-04-29 10:43:49 +02:00
Ronak Baxi 393f136509 [IMP] *: Uniformize all modal footers
The main button has classnames btn btn-primary.
Other buttons have classnames btn btn-default.
No more 'or' between the buttons.
2015-08-19 08:10:45 +02:00
Fabien Pinckaers 5a3d0947f2 [IMP] Supplier --> Vendor 2015-07-16 14:55:20 -07:00
Fabien Pinckaers 1fe10b5417 [IMP] Supplier --> Vendor. American English 2015-07-09 16:10:09 -07:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Goffin Simon 0fd773a486 [IMP] Cleanup and refactoring of exception handling
Unify and refactor exception handling in framework and addons.

The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
 - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
 - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
 - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
 - `MissingError`: raised when an operation is attempted on a record that does not exist.
 - `ValidationError`: raised when an operation violates a SQL or Python constraint.
 - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.

All exceptions take a single message argument.

The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.

A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.

This commit introduces a more consistent policy for logging errors and warnings:
 - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
 - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
 - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-16 17:15:18 +01:00
Yannick Tivisse e9d83ea39a [IMP] purchase_requisition: terminology
Rename "Call for Bid" into "Call for Tender" when on the buyer's side.
2015-01-05 12:15:15 +01:00
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
rsi-odoo 6b34dd9622 [IMP] purchase_requisition : onboarding of purchase views 2014-12-30 11:41:40 +01:00
Fabien Meghazi faa09da325 Removed version="7.0" from form views 2014-06-12 09:09:59 +02:00
Quentin (OpenERP) 7a6b00b651 [MERGE] merged with trunk up to revision 9381
bzr revid: qdp-launchpad@openerp.com-20140425090414-vpg4szws9y4fgznc
2014-04-25 11:04:14 +02:00
Bharat R. Devnani (OpenERP) 9e102b6b24 [MERGE] merged with main addons
bzr revid: bde@tinyerp.com-20140212064422-4thlmyk5psff9lth
2014-02-12 12:14:22 +05:30
Quentin (OpenERP) 753f7541db [MERGE] main trunk
bzr revid: qdp-launchpad@openerp.com-20140203173000-mk092iw2wz3y0e3e
2014-02-03 18:30:00 +01:00
Bharat R. Devnani (OpenERP) f9226c63a2 [IMP] improved message
bzr revid: bde@tinyerp.com-20140124130327-l1cvpcy7cpkl32bs
2014-01-24 18:33:27 +05:30
Bharat R. Devnani (OpenERP) 28a33f3a8d [IMP] improved some warning messages
bzr revid: bde@tinyerp.com-20140124123045-kgovbmuhkovax068
2014-01-24 18:00:45 +05:30
Christophe Matthieu d0bdb21eb2 [IMP] purchase_requisition: remove unused import
bzr revid: chm@openerp.com-20131211090146-rafbej67r9ssj8zg
2013-12-11 10:01:46 +01:00
Bharat R. Devnani (OpenERP) baa430d237 [IMP] improved warning messages
bzr revid: bde@tinyerp.com-20131202084204-r0br5ytoc12ysjrl
2013-12-02 14:12:04 +05:30
Quentin (OpenERP) aad106a3aa [WIP] code review
bzr revid: qdp-launchpad@openerp.com-20130730103127-d9m5lwvdtgft1fj6
2013-07-30 12:31:27 +02:00
Cedric Snauwaert 973185a728 [MERGE]merge modification of purchase and purchase tender with wmsimplement-fp branch
bzr revid: csn@openerp.com-20130729094043-14j696ojpzecg8qu
2013-07-29 11:40:43 +02:00
Jacques-Etienne Baudoux 1e2872c521 [FIX]purchase_requisition: view titles, help messages, documentation
bzr revid: je@bcim.be-20130625094927-c9486m672xn3m8fz
2013-06-25 11:49:27 +02:00
Cedric Snauwaert cddfd7f129 [FIX]purchase_requisition: add workflow to tender, change procurement workflow and rename purchase requisition into request for tender
bzr revid: csn@openerp.com-20130611130343-gjlhxm694a9z9b7u
2013-06-11 15:03:43 +02:00
Cedric Snauwaert e5db46a1cc [FIX]purchase_requisition: TYPO
bzr revid: csn@openerp.com-20130607125650-y1h60lyalju6gh8f
2013-06-07 14:56:50 +02:00
Cedric Snauwaert d39a918143 [FIX]purchase_requisition: add button and a new state in purchase order workflow and changes in tender process
bzr revid: csn@openerp.com-20130529095150-4f0g1vmfj9h54juu
2013-05-29 11:51:50 +02:00
Vo Minh Thu e69326ee3b [REF] removed explicit model instanciations.
bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz
2013-04-15 12:23:49 +02:00
Vo Minh Thu ca89ae8f71 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121206151316-u1eqx41ltjpz2lrd
2012-12-06 16:13:16 +01:00
Vo Minh Thu e7f4891d46 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121206145632-0h1coh5aaem65wsy
2012-12-06 15:56:32 +01:00
Ajay Chauhan (OpenERP) 037508d100 [IMP] purchase_requisition: made supplier created insted of customer from wizard 'Requests for quatation'
bzr revid: cha@tinyerp.com-20121122113722-asucj5l3l1j5hn1o
2012-11-22 17:07:22 +05:30
Vo Minh Thu 9822629548 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120813160657-ilujdek8ys4fzhp9
2012-08-13 18:06:57 +02:00
Twinkle Christian (OpenERP) fc1b1749a8 [IMP]Remove type field from the modules
bzr revid: tch@tinyerp.com-20120809060516-zgx3gdyv6wdshfyw
2012-08-09 11:35:16 +05:30
Hardik 646b0a1067 [IMP]Purchase : Warinig Messages are Changed
bzr revid: hsa@tinyerp.com-20120712060049-u38d37i1oxz7bo3g
2012-07-12 11:30:49 +05:30
Fabien Pinckaers 64a9321d56 [IMP] footer on forms
bzr revid: fp@tinyerp.com-20120710164011-unqi1okf2uu8yhts
2012-07-10 18:40:11 +02:00
Raphael Collet 5133bee1d5 [FIX] in form views, replace class 'oe_highlight_on_dirty' by 'oe_highlight'
bzr revid: rco@openerp.com-20120629083024-rqhtbf9melkygg0m
2012-06-29 10:30:24 +02:00
Raphael Collet 1debe0efcd [MERGE] from trunk
bzr revid: rco@openerp.com-20120628131210-hyx2t1lqbl5hwm9g
2012-06-28 15:12:10 +02:00
Jigar Amin - OpenERP 11224704cd [FIX] purchase*, sale, share, report_webkit, buton cancel
bzr revid: jam@tinyerp.com-20120627134530-141mzncfffkmjrom
2012-06-27 19:15:30 +05:30
Twinkle (OpenERP) 471037495c [IMP]Apply css class flow on wizards buttons
bzr revid: tch@tinyerp.com-20120626063119-5i93di16milljxap
2012-06-26 12:01:19 +05:30
Twinkle (OpenERP) 0e97cefe9e [IMP]Improve wizard button
bzr revid: tch@tinyerp.com-20120625100901-ucjbttxod55erqmf
2012-06-25 15:39:01 +05:30
Twinkle (OpenERP) 660cc67256 [IMP]Added highlight button on wizard
bzr revid: tch@tinyerp.com-20120620104923-z1hty740vn160fg9
2012-06-20 16:19:23 +05:30
Twinkle (OpenERP) 5db031806b [IMP]Purchase:Remove cancel button from wizard and added active class flow on buttoncd
bzr revid: tch@tinyerp.com-20120618062029-byrsndkcfu5iv34f
2012-06-18 11:50:29 +05:30
Atul Patel (OpenERP) 2474a8f1be [MERGE]: Merged lp:openobject-addons
bzr revid: atp@tinyerp.com-20120612090350-axi2bpkvs63zy3i5
2012-06-12 14:33:50 +05:30
Fabien Pinckaers 1f885950b4 [FIX] headers
bzr revid: fp@tinyerp.com-20120609222849-gm9loztzarjyn7pl
2012-06-10 00:28:49 +02:00
Fabien Pinckaers 7e5c7916a2 [IMP] form view, removed project_planning
bzr revid: fp@tinyerp.com-20120609194946-5pgqdhkf1mmrleox
2012-06-09 21:49:46 +02:00
Bharat Devnani (OpenERP) e7de1fcb4e [ADD] added functionality of counting records which are in draft state in purchase requisition menu and also changed string of partner_id in wizard
bzr revid: bde@tinyerp.com-20120601123048-ojix38618v9jo2km
2012-06-01 18:00:48 +05:30
Bharat Devnani (OpenERP) 2b0baedd85 [REM] removed references of res.partner.address from purchase_requisition module
bzr revid: bde@tinyerp.com-20120306120525-zr2gd25vxq5liu33
2012-03-06 17:35:25 +05:30
Harry (OpenERP) 6ced5c16c1 [REF] purchase_requisition:
purchase_requisition/wizard/purchase_requisition_partner.py
* [REF] In create_order() method, move stuff of creating purchase order into 'purchase.requisition' object.
purchase_requisition/purchase_requisition.py
* [ADD] introduce new method: make_purchase_order()
        - to create new RFQ of specified supplier with plannned date, price

bzr revid: hmo@tinyerp.com-20111202072755-e3ura2cmnh78utet
2011-12-02 12:57:55 +05:30
Harry (OpenERP) bdf23343b1 [MERGE] merged cleanup yml:
purchase_requisition/purchase_requisition.py
* [IMP] call tender_done() method instead of set state manually.

purchase_requisition/purchase_requisition_demo.xml
* [IMP] added demo data of requisition with RFQs

purchase_requisition/wizard/purchase_requisition_partner.py
* [IMP] address_id is not mandatory. so remove required tag

[IMP] Test cases of requisition process
* purchase_requisition.yml
* purchase_requisition_demo.yml

[REM]
* purchase_requisition_exclusive.yml [move into requisition.yml]
* purchase_requisition_report.yml [move into requisition.yml]

bzr revid: hmo@tinyerp.com-20111202051506-kmlsfqnoqcafkic5
2011-12-02 10:45:06 +05:30
Rucha (Open ERP) 62b3abd6c0 [MERGE]: Merge with latest trunk
bzr revid: rpa@tinyerp.com-20110314102742-xsankh8h4q562lv8
2011-03-14 15:57:42 +05:30
ron@tinyerp.com 33800b2e8f [IMP]Purchase Requisition:Improve string
bzr revid: ron@tinyerp.com-20110301104522-jii69dd9w7eubpex
2011-03-01 16:15:22 +05:30
ron@tinyerp.com 3ee1e7c94a [IMP]Purchase Requisition:change the warning string
bzr revid: ron@tinyerp.com-20110301100818-s42hkxpkes8mrdif
2011-03-01 15:38:18 +05:30