Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8.0 new addons: sale_quotation_sourcing #41

Merged
merged 44 commits into from Oct 8, 2014

Conversation

gurneyalex
Copy link
Member

sale_quotation_sourcing allows to invert the purchase sourcing logic in Odoo. In this mode, an RFQ is sent to to suppliers before the SO is confirmed (in order to get the best quote, and to ensure that the price communicated to the customer is computed based on that quote). When the SO is confirmed, a link can be made to the RFQ to use for sourcing the sale, and the procurement order will not create a new PO.

wizard view is there, more work needed to customize the procurment handling
+ flake8 clean of sale_order
remove travis_run_flake8
set a separate env for testing sale_quotation_sourcing, and it seems that
another addon is changing a return value which makes our tests unhappy
@coveralls
Copy link

Coverage Status

Coverage increased (+8.37%) when pulling f7fbc19 on gurneyalex:8.0-sale_quotation_sourcing into def38ad on OCA:8.0.

@eLBati
Copy link
Member

eLBati commented Sep 12, 2014

Hello @gurneyalex OCB are red because of

2014-09-12 13:48:26,444 23272 INFO openerp_test openerp.modules.loading: loading sale_quotation_sourcing/tests/sourcing.yml
2014-09-12 13:48:27,599 23272 ERROR openerp_test openerp.tools.yaml_import: AssertionError in Python code (line 43): retval: {'view_mode': 'form', 'res_id': 9, 'name': 'Sales Order', 'nodestroy': True, 'view_type': 'form', 'res_model': 'sale.order', 'view_id': (699,), 'type': 'ir.actions.act_window', 'target': 'current'}

@gurneyalex
Copy link
Member Author

@eLBati yes... I'm pretty sure this is because the OCB 8.0 branch is 10 days behind the official branch.

once sale_exceptions is fixed, not need for 4 environments
@pedrobaeza
Copy link
Member

I'm pushing manually changes to OCB 8.0 for now and restart Travis build. Let's wait for a green! 😉

@coveralls
Copy link

Coverage Status

Coverage increased (+14.69%) when pulling b795c12 on gurneyalex:8.0-sale_quotation_sourcing into def38ad on OCA:8.0.

@jgrandguillaume
Copy link
Member

Hi,
Thanks for this work ! I like the wizard and the way to implement the feature. Some remarks I have while testing :

  1. In openerp.py, the name of the module should be "Sale Quotation Sourcing"
  2. I think you should overide the "copy()" method of SaleOrderLine in order to empty the "sourced_by" field. We always want to chose from which PO we want to source from. If we copy that info, we do not have the opportunity to chose the PO (it'll take the same one than the copied SO, which is probably not wanted).
  3. Sourcing a line with another product should not be allowed. We should filter the product of the PO line according to the product of the SO line
  4. When we cancelled a PO, I think it should cancel the related procurement. This sounds like a generic bug to me (not linked to your module). This worked in v 7.0 and doesn't seems to work in v 8.0 standard.
  5. When I manually source a SO Line, I have no delivery generated :
    1. Create a PO with ipad mini and confirm
    2. Create SO with one line ipad mini, manually sourced by PO line above
    3. Confirm the SO, no delivery is generated
    • => Here we should generate the delivery for the SO. The PO reception make "Supplier -> Stock" the SO Delivery should make the "Stock -> Customer" move. Otherwise it doesn't work.
    • => If the route "drop shipping" was selected, then the behavior is correct => only one PO Reception should be generated (and no SO delivery).
  6. The sale_quotation_sourcing module should enable the "Choose MTO, drop shipping,... on sales order lines " in Sale configuration as well as enabling in the route called "Make to order" the checkbox: Applicable on "Sale Order Line".
  7. Sourcing line manually should automatically set the route "Make to Order" on the SO Line (we cannot chose a PO line on stock, it make no sense I think). We should be able to change this to use the "Drop shipping " route instead.

Well, this is all I figure it out when testing it. A part from that, it's exactly what we needed.

Thanks,

Joël

@lepistone
Copy link
Member

I'm taking care of @jgrandguillaume's remarks (WIP)

@coveralls
Copy link

Coverage Status

Coverage increased (+14.69%) when pulling 277f3c1 on gurneyalex:8.0-sale_quotation_sourcing into e71aafd on OCA:8.0.

Apparently, MTO rules are have action="move". With this change, we do
generate an outgoing picking when the SO is validated.
In a MTO case, two procurements are generated, and it is the second one
that is to be attached to the purchase order
This check is done when the procurement is processed, which happens when
the Sale Order is validated. We cannot easily check before validation
because we need to know what destination location has been chosen in the
procurement. Just checking the route selected in the Sale Order Line is
too restrictive because the Route can be chosen in many other places.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) when pulling 4553508 on gurneyalex:8.0-sale_quotation_sourcing into 08440b4 on OCA:8.0.

@lepistone
Copy link
Member

@yvaucher your remarks are addressed.

  1. thanks to options="{'no_create': True}"
  2. thanks to @jgrandguillaume's contribution

@yvaucher
Copy link
Member

yvaucher commented Oct 8, 2014

@lepistone thanks! 👍

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) when pulling 4553508 on gurneyalex:8.0-sale_quotation_sourcing into 08440b4 on OCA:8.0.

@lepistone
Copy link
Member

@jgrandguillaume for the drop shipping case, I thought that the "drop shipping" route is just configuration data that is created by the stock_dropshipping module. Moreover, the logic for choosing routes and rules is complex, since those could be specified on the SO line, product or category and configured in many different ways, with or without stock_dropshipping.

For that reason I did a variant of what you suggest: when the SO is confirmed, and the procurement is processed, I check that the destination location of the procurement (whatever way it is computed) is the same as the destination location of the chosen PO. If not, I block the validation with a long message.

It would probably be more user-friendly to check immediately (maybe with an onchange or domain) but I think at that point I don't have enough information for that.

I added two new test cases: one for the standard dropshipping case, and one for dropshipping + manual sourcing.

yvaucher added a commit that referenced this pull request Oct 8, 2014
8.0 new addons: sale_quotation_sourcing
@yvaucher yvaucher merged commit ae1d8a9 into OCA:8.0 Oct 8, 2014
@erwintwr2
Copy link

Hi guys

trying to see if your module can perform the following ( since i assume this was the original intention of the module - please correct me if i am wrong) :

_PROCESS START_***

  • customer request comes in (various items from different suppliers)
  • we require to update our pricing on all items, thus a RFQ is started (actually more correct, a Calls
    for bid, as this allows me to enter the exact list or products, and let the system create RFQ;s for the correct suppliers matching the products
  • Once the call for bid is complete - eg pricing is updated, a Sales Quote is to be generated (i am still unsure how the pricing update is to be handled except by manually going through each approved RFQ, and editing the public price for each product?? - can be very time consuming on large quotes)
  • considering that all the products/ Lines is already added on the call for bids, the next step would have been to simply convert the call for bids to a sales order (selecting customer and applicable price sale price list so that products can be quoted using latest price and mark-up)
  • Sales quote is sent to customer
  • customer accepts Sales quote
  • Call for bid is resumed, creating orders for the various suppliers

after this the usual deliver/ invoice process continues
*
_PROCESS END_*****

Currently my experience of the module is that it is still very manual- eg i have to create a bid for all the products, make a list of RFQ's for each product,update product pricing, and then create the sales order lines with manual sourcing and linking to the relevant RFQ.

Considering that multiple quotes can be awaiting customer order at a time, i further see a problem with the huge list of RFQ's that will be sitting in the que waiting for their respective sales orders. this could confuse the stock control/warehouse should they need to procure actual products.

Am i maybe overlooking some functionality?

thank you

Erwin

@gurneyalex
Copy link
Member Author

@erwintwr2 this module serves as a basis for the process you describe. It works together with other addons in OCA/purchase-workflow and OCA/vertical-ngo. Note that there will be a presentation of these addons during the community days.

Could we move the discussion to the community mailing list rather than on a PR?

@erwintwr2
Copy link

Hi Alex

Thank you for the feedback. I am most definitely interested in receiving updates on this. Can you advise which mailing list i can join?

regards

@gurneyalex gurneyalex deleted the 8.0-sale_quotation_sourcing branch May 9, 2015 13:26
@gurneyalex
Copy link
Member Author

@erwintwr2 community@lists.odoo.com is the best place for this.

dreispt pushed a commit to dreispt/sale-workflow that referenced this pull request Jul 7, 2015
make so department readonly like other fields
lmignon pushed a commit to acsone/sale-workflow that referenced this pull request Feb 11, 2021
Signed-off-by jgrandguillaume
lmignon pushed a commit to acsone/sale-workflow that referenced this pull request Feb 11, 2021
@dzenkins
Copy link

Hey, is this functionality still available in an add-on for Odoo 15?

@gurneyalex
Copy link
Member Author

@dzenkins wow you are unearthing old things... To my knowledge this is not supported by any addon or standard in v15 so you would need to "migrate" this module to the version. I put quotes because things have changed a lot in the meantime and probably this will result in a significant rewrite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants