Skip to content

[MIG][10.0]product_supplier_info_for_customer#292

Merged
elicoidal merged 19 commits intoOCA:10.0from
ForgeFlow:10.0-mig-product_supplierinfo_for_customer
Jun 30, 2018
Merged

[MIG][10.0]product_supplier_info_for_customer#292
elicoidal merged 19 commits intoOCA:10.0from
ForgeFlow:10.0-mig-product_supplierinfo_for_customer

Conversation

@AaronHForgeFlow
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow commented Sep 29, 2017

Use product supplier info also for customers

This modules allows to use supplier info structure, available in Inventory tab of the product form, also for defining customer information, allowing to define prices per customer and product.

Update: Added back the option to import supplierinfo prices to PL items

Known issues

  • As discussed here: [MGR] Migrated product_customer_code to version 10 #236 The module product_customer_code is deprecated in favor of this one.

  • The product.supplierinfo form view is overwritten as the absence of name attributes make it impossible to inherit.

  • This module only import prices from supplierinfo for customers not suppliers.

@AaronHForgeFlow AaronHForgeFlow changed the title [MIG]product_supplier_info_for_customer [MIG][10.0]product_supplier_info_for_customer Sep 29, 2017
@AaronHForgeFlow AaronHForgeFlow mentioned this pull request Sep 29, 2017
35 tasks
@AaronHForgeFlow AaronHForgeFlow force-pushed the 10.0-mig-product_supplierinfo_for_customer branch from 6dc8992 to c40373e Compare September 29, 2017 14:33
@AaronHForgeFlow AaronHForgeFlow changed the title [MIG][10.0]product_supplier_info_for_customer [MIG][10.0]product_supplier_info_for_customer (WIP) Sep 29, 2017
@AaronHForgeFlow AaronHForgeFlow force-pushed the 10.0-mig-product_supplierinfo_for_customer branch from c40373e to 912369c Compare September 29, 2017 16:10
@AaronHForgeFlow AaronHForgeFlow changed the title [MIG][10.0]product_supplier_info_for_customer (WIP) [MIG][10.0]product_supplier_info_for_customer Oct 10, 2017
@AaronHForgeFlow AaronHForgeFlow changed the title [MIG][10.0]product_supplier_info_for_customer [MIG][10.0]product_supplier_info_for_customer (WIP) Oct 10, 2017
@AaronHForgeFlow AaronHForgeFlow changed the title [MIG][10.0]product_supplier_info_for_customer (WIP) [MIG][10.0]product_supplier_info_for_customer Oct 17, 2017
@AaronHForgeFlow AaronHForgeFlow force-pushed the 10.0-mig-product_supplierinfo_for_customer branch 2 times, most recently from bd04317 to 8ce61b0 Compare October 17, 2017 08:33
Copy link

@elicoidal elicoidal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some details but overall LGTM
Functional tests are OK
Good job!


* Product prices through this method are only guaranteed on the standard sale
order workflow. Other custom flows maybe don't reflect the price.
* The minimum quantity will not also be applied on sale orders.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"neither will apply "

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
##############################################################################

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for copyright notice in __init__.py

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use standard copyright headers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the copyright holder


For these prices to be used in sale prices calculations, you will have
to create a pricelist with a rule with option "Based on" with the value
"Supplier prices on the product form" (although the text is not clear enough).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not change the name to "Partner prices on the product form"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the mistake. This text is obsolete as that options is not available in v10. Currently the prices in the pricelist are not passed to the SO. I'm wondering if adding this feature back is really needed or that can be implemented in other way 😕

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I feel it is redundant with the PL management system so I would not fight for it


The product code / product name specified for the customer can be reflected
on the sale orders using module `product_supplierinfo_for_customer_sale
<https://github.com/OCA/product-attribute/tree/8.0/product_supplierinfo_for_customer_sale>`_

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 The module is not migrated yet, so I'll just remove this section. When migrating product_supplierinfo_for_customer_sale this readme will be updated

* Product prices through this method are only guaranteed on the standard sale
order workflow. Other custom flows maybe don't reflect the price.
* The minimum quantity will not also be applied on sale orders.
* Computed fields in product.supplierinfo object won't properly work for

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't work properly
(although I do not really understand what the sentence means)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not valid in v10, so removed.


For these prices to be used in sale prices calculations, you will have
to create a pricelist with a rule with option "Based on" with the value
"Supplier prices on the product form" (although the text is not clear enough).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I feel it is redundant with the PL management system so I would not fight for it

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the copyright holder

@AaronHForgeFlow
Copy link
Contributor Author

@elicoidal Now there's no option in the pricelist to choose the price from the supplierinfo. I opened an issue here: #297 If it's ok to all I'll put that feature back

@elicoidal
Copy link

I mean for customer function that links to supplierinfo table is redundant with standard pricelist (set up price x product).
@aheficent

@AaronHForgeFlow
Copy link
Contributor Author

@elicoidal But it's not possible to associate a pricelist to a specific customer, so if I need to specify a fix price for a customer it's not possible.

@elicoidal
Copy link

@aheficent I am not quite sure what you mean by " it's not possible to associate a pricelist to a specific customer".
IMO you can:

  1. Create a Pricelist called "Pricelist Agrolait"
  2. add rules one by one per product / price or any other filter
  3. Assign the PL to Agrolait (and not assign it to another customer for sure)

Maybe I did not understand your meaning

@AaronHForgeFlow
Copy link
Contributor Author

@elicoidal In this case step3 is totally manual, isn't it? Users have to search and select the proper PL in SO among other PL for other customers.

@pedrobaeza
Copy link
Member

@elicoidal it's not direct to have a fixed price per customer (although I don't see this as a viable way of doing business, but you know, customers demand...), so this will fill the gap.

@AaronHForgeFlow
Copy link
Contributor Author

Is ok then to add a partner_id field to product.pricelist.item model?

@elicoidal
Copy link

@pedrobaeza @aheficent

In this case step3 is totally manual, isn't it? Users have to search and select the proper PL in SO among other PL for other customers.

As manual but far less than selecting n times the customer in supplierinfo table (in my case you have only one selection of the price list in the customer)
NB: you could add a partner_id in the PL and on_change to automatically assign the PL in the customer

it's not direct to have a fixed price per customer (although I don't see this as a viable way of doing business, but you know, customers demand...), so this will fill the gap.

Not sure about your meaning here.

As said, I am not against the feature (and I am not blocking it) but I think it is redundant and I do not see really the advantage of your solution compared with the standard pricelist (or features that could not be done via pricelist).

@AaronHForgeFlow
Copy link
Contributor Author

AaronHForgeFlow commented Oct 24, 2017

As you can specify the PL in the customer I don't like the idea of putting the partner in the PL. I think that a wizard that allows to manually import the prices from the supplier.info to the PL it's better.

PS: From my side it's ok to leave the module as it is, however, the module will be losing some of the features it had in v8.

@elicoidal
Copy link

@aheficent Anyway your added feature would apply for both suppliers and customer so actually I think adding it does add something that current version does not provide (PL function of product partner price).
So probably good idea to add it (up to you 👅 )

@AaronHForgeFlow
Copy link
Contributor Author

@elicoidal Added the features but in button. Some issues found:

  • It's not possible to create pricelist items in an onchange method. If this is ok I'll move the button to a wizard.
  • I restricted the importing to customers because that was the purpose of this module, get the specific prices from customers.

@elicoidal
Copy link

@aheficent Sorry but I am not following you. Which button and/or wizard are you talking about?

@AaronHForgeFlow
Copy link
Contributor Author

@elicoidal Button in the PL to import supplier.info into PL items

@elicoidal
Copy link

@aheficent Here I am not sure to follow: this would duplicate the data (with possible sync erreur/mistake).
IMO this is not desirable: why not forward port the feature of "Supplier price in Product form" in the PL? It is not possible?

Otherwise I would suggest not to use prices in product for customers and hide them in the form.

All in all I have the feeling we are making a complex feature out of simple problem.

@AaronHForgeFlow
Copy link
Contributor Author

@elicoidal That's what I suggested first. To forward port the feature of "Supplier price in Product form" in the PL. That option was on PL items not in the PL itself because the product is selected in the PL item. I prefer this also.

@elicoidal
Copy link

@aheficent In summary. options:

  • forward port supplier in product: redundant (but acceptable IMO)
  • No use the price in product (but then needs to be comfortable to use pricelist)

I dont like the button option (for duplicated data)

@MiquelRForgeFlow MiquelRForgeFlow force-pushed the 10.0-mig-product_supplierinfo_for_customer branch from a0818cf to 2c2f3ec Compare June 28, 2018 15:49
@pedrobaeza
Copy link
Member

See comments from v9.

@MiquelRForgeFlow MiquelRForgeFlow force-pushed the 10.0-mig-product_supplierinfo_for_customer branch from 0eb6f56 to dd31c75 Compare June 29, 2018 10:55
@MiquelRForgeFlow MiquelRForgeFlow force-pushed the 10.0-mig-product_supplierinfo_for_customer branch from dd31c75 to 3868474 Compare June 29, 2018 10:58
@MiquelRForgeFlow
Copy link
Contributor

updated

@AaronHForgeFlow
Copy link
Contributor Author

@elicoidal IMO your comments were attended, is it possible to update your review? Thanks

Copy link

@elicoidal elicoidal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Merging given the feedback and time under review

@elicoidal elicoidal merged commit 4f7cb0f into OCA:10.0 Jun 30, 2018
@pedrobaeza
Copy link
Member

@elicoidal you have missed my comment #292 (comment). @aheficent please make another PR with the changes that you have already made on v9

@elicoidal
Copy link

@pedrobaeza sorry about that: I had the feeling it was covered.

@MiquelRForgeFlow
Copy link
Contributor

@pedrobaeza your comments were covered.

@MiquelRForgeFlow MiquelRForgeFlow deleted the 10.0-mig-product_supplierinfo_for_customer branch July 2, 2018 09:50
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.

10 participants