Community mailing list archives
Re: Margin Percentage on Quotationby
Pedro M. Baeza
There is this old PR that I have to work on it that makes something similar: https://github.com/OCA/sale-workflow/pull/54Regards.
2015-06-29 11:11 GMT+02:00 Carlos Liébana <firstname.lastname@example.org>:
Hello Graeme,Currently https://github.com/gdgellatly/o4sb-addons is protected or doesn't exist. Your sale_pricelist_recalculation sounds good and we want to test it further, where can we find it?Also, regarding product variants, where is all this developments taking place? We don't see anything in OCA https://github.com/OCA/product-variantThanks in advance.2015-06-24 9:27 GMT+02:00 Graeme Gellatly <email@example.com>:But until I have got all the original features of product_variant_multi restored into the new variants model of v8 I won't be looking at this as it depends on many of those features and that is a big job. The new variants model doesn't have basic required features likeAnd it will update draft and confirmed (but not validated invoiced) sale orders plus any associated draft invoices.Many years ago when OpenERP used to respond to bug reports for new features odony wrote a little module for me called sale_pricelist_recalculation.I've maintained it sparingly since then and ported to new versions (as well as created purchase_pricelist_recalculation).It is at gdgellatly/o4sb-addonsAt v7 the working production features are -
Change pricelist on draft sale ordersHowever in test/development since January, using the identical concept we have
- Balance to amount - including tax (nearly works, depends on quantity of last line the size of the difference, can be out by ((0.01 + tax) * last_line_qty)
- Balance to amount - excluding tax (as above)
- Update from Quote (matches on product templates, ignores non-quoted lines as we use colours a lot and quoted colour always different to ordered one, plus has some hardcoded logic that needs removal)
- Manually reprice all lines using either unit price, discount or line subtotal (also has a slight rounding issue when using price_subtotal).
- Add freight cost (currently will add a new line rather than updating existing if found, and relies on a hardcoded freight code)To add the margin feature is pretty easy, maybe 3 lines of code so I will add it, and I am working on v8 ports at the moment and this was one that I identified as a good candidate to clean up for OCA, now that variants is built in but in the meantime, you can always modify the original sale_pricelist_recalculation module, just needs the error checking removed and the loop amended to rather than update from pricelist to use cost price.
But you could also do it without a wizard if you only needed to update quotes/draft sale orders. I prefer the wizard because sale order lines themselves are writable individually, just not on the order when confirmed.
account_fiscal_position_update from akretion/OCA uses this concept (updates lines from the header document), and from memory if you look in the old PR's it does it with an onchange although I think after review it was settled on to use a button to make the change in the end.
different cost per variant (nearly ready for review),
code generation (in review, done by akretion, needs fixing),
attribute groups (in review, although currently unreviewed),
supplier per variant (initial design didn't work),
price history per variant (design done)
and is written in a really hard way to modify without affecting other modules which rely on products. But we are getting there, although that is not a comprehensive list.On Wed, Jun 24, 2015 at 11:23 AM, <firstname.lastname@example.org> wrote:You're mail will be quarantined and examined before delivery.--