[Openerp-community] Multi-company cost calculation

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Openerp-community] Multi-company cost calculation

Eric Caudal - www.elico-corp.com
Hi,
Currently Odoo 7 doesnot handle properly 2 type of costing for separate companies inside the same instance (average cost for company A and standard cost for company B for example).

We are using the product_price_history module for multi-company price logging: would it be a good idea to change the cost_method to property field within this module?

What would be the impact on performance?
What would be the alternative?
--
Eric CAUDAL
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: + 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico
        Corp Odoo
        Silver Partner

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Multi-company cost calculation

Bidoul, Stéphane
Hi Eric,

I did a quick scan of our code that could depend on that and at first glance I would see no issue with cost_method becoming a property.

Regards,

-sbi


On Fri, Jun 20, 2014 at 2:13 AM, Eric Caudal <[hidden email]> wrote:
Hi,
Currently Odoo 7 doesnot handle properly 2 type of costing for separate companies inside the same instance (average cost for company A and standard cost for company B for example).

We are using the product_price_history module for multi-company price logging: would it be a good idea to change the cost_method to property field within this module?

What would be the impact on performance?
What would be the alternative?
--
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: + 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico
        Corp Odoo
        Silver Partner

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Multi-company cost calculation

Joël Grand-Guillaume @ camptocamp
In reply to this post by Eric Caudal - www.elico-corp.com
Hi Eric,


I think the problem is the performance issue... The property field are perfo killer and as this module adds quite lots of read in lot's of places, we already spend time to make it as quick as possible.

A part from that, I agree on the principle, because of course a same product should not have the same costing method in each company...

So, our options:

1) Make different product for each company when costing method isn't the same

2) Add this cost_method field as a property and test it among lots of products and move to ensure it's ok. If yes includer in the price_history module

3) Add this cost_method field as a property in a separate module, letting the us possibility to chose wether to include it or not. I would see this module in the same margin-analysis branch and would love to see a comment in the description of the price_history about that new module.

My2cents,

Joël







On Fri, Jun 20, 2014 at 2:13 AM, Eric Caudal <[hidden email]> wrote:
Hi,
Currently Odoo 7 doesnot handle properly 2 type of costing for separate companies inside the same instance (average cost for company A and standard cost for company B for example).

We are using the product_price_history module for multi-company price logging: would it be a good idea to change the cost_method to property field within this module?

What would be the impact on performance?
What would be the alternative?
--
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico
        Corp Odoo
        Silver Partner

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp




--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Multi-company cost calculation

Eric Caudal - www.elico-corp.com
Hi Joël,
I vote for 3
Eric CAUDAL
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: + 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico
          Corp Odoo
          Silver Partner
On 06/20/2014 05:07 PM, Joël Grand-Guillaume wrote:
Hi Eric,


I think the problem is the performance issue... The property field are perfo killer and as this module adds quite lots of read in lot's of places, we already spend time to make it as quick as possible.

A part from that, I agree on the principle, because of course a same product should not have the same costing method in each company...

So, our options:

1) Make different product for each company when costing method isn't the same

2) Add this cost_method field as a property and test it among lots of products and move to ensure it's ok. If yes includer in the price_history module

3) Add this cost_method field as a property in a separate module, letting the us possibility to chose wether to include it or not. I would see this module in the same margin-analysis branch and would love to see a comment in the description of the price_history about that new module.

My2cents,

Joël







On Fri, Jun 20, 2014 at 2:13 AM, Eric Caudal <[hidden email]> wrote:
Hi,
Currently Odoo 7 doesnot handle properly 2 type of costing for separate companies inside the same instance (average cost for company A and standard cost for company B for example).

We are using the product_price_history module for multi-company price logging: would it be a good idea to change the cost_method to property field within this module?

What would be the impact on performance?
What would be the alternative?
--
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a moz-do-not-send="true" href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico Corp Odoo Silver Partner

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp




--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Multi-company cost calculation

Bidoul, Stéphane
Option 3 is lowest risk indeed.

-sbi


On Fri, Jun 20, 2014 at 11:10 AM, Eric Caudal <[hidden email]> wrote:
Hi Joël,
I vote for 3

Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: + 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico
          Corp Odoo
          Silver Partner
On 06/20/2014 05:07 PM, Joël Grand-Guillaume wrote:
Hi Eric,


I think the problem is the performance issue... The property field are perfo killer and as this module adds quite lots of read in lot's of places, we already spend time to make it as quick as possible.

A part from that, I agree on the principle, because of course a same product should not have the same costing method in each company...

So, our options:

1) Make different product for each company when costing method isn't the same

2) Add this cost_method field as a property and test it among lots of products and move to ensure it's ok. If yes includer in the price_history module

3) Add this cost_method field as a property in a separate module, letting the us possibility to chose wether to include it or not. I would see this module in the same margin-analysis branch and would love to see a comment in the description of the price_history about that new module.

My2cents,

Joël







On Fri, Jun 20, 2014 at 2:13 AM, Eric Caudal <[hidden email]> wrote:
Hi,
Currently Odoo 7 doesnot handle properly 2 type of costing for separate companies inside the same instance (average cost for company A and standard cost for company B for example).

We are using the product_price_history module for multi-company price logging: would it be a good idea to change the cost_method to property field within this module?

What would be the impact on performance?
What would be the alternative?
--
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico Corp Odoo Silver Partner

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp




--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Multi-company cost calculation

Raphael Valyi
In reply to this post by Eric Caudal - www.elico-corp.com
Hello people,

nice topic indeed.

I also think there is also an option 4:

4) I cannot believe properties can not be made way faster than the current python trickery.

wouldn't that be faster to have properties manipulated say with small PLSQL methods avoiding round tripping between the python and the DB?
or a fields2.propery new implementation in DB possibly with the same surface API?

properties are also a report usability killer the way it is currently. We often hack properties as computed stored fields in OLAP reports...

just thinking loud.


-- 
Raphaël Valyi
Founder and consultant
+55 21 3942-2434



On Fri, Jun 20, 2014 at 6:10 AM, Eric Caudal <[hidden email]> wrote:
Hi Joël,
I vote for 3

Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico
          Corp Odoo
          Silver Partner
On 06/20/2014 05:07 PM, Joël Grand-Guillaume wrote:
Hi Eric,


I think the problem is the performance issue... The property field are perfo killer and as this module adds quite lots of read in lot's of places, we already spend time to make it as quick as possible.

A part from that, I agree on the principle, because of course a same product should not have the same costing method in each company...

So, our options:

1) Make different product for each company when costing method isn't the same

2) Add this cost_method field as a property and test it among lots of products and move to ensure it's ok. If yes includer in the price_history module

3) Add this cost_method field as a property in a separate module, letting the us possibility to chose wether to include it or not. I would see this module in the same margin-analysis branch and would love to see a comment in the description of the price_history about that new module.

My2cents,

Joël







On Fri, Jun 20, 2014 at 2:13 AM, Eric Caudal <[hidden email]> wrote:
Hi,
Currently Odoo 7 doesnot handle properly 2 type of costing for separate companies inside the same instance (average cost for company A and standard cost for company B for example).

We are using the product_price_history module for multi-company price logging: would it be a good idea to change the cost_method to property field within this module?

What would be the impact on performance?
What would be the alternative?
--
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico Corp Odoo Silver Partner

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp




--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Multi-company cost calculation

Joël Grand-Guillaume @ camptocamp
hi Raphael,

i agree with you, but I remember it was in the roadmap to improve those proprty field for v8.. Not aware if it has been done or not...

Anyway, I think for the time being, go for option 3.

Improving property field is needed and must be adressed, but may be not in this context.

Regards,

Joël


On Fri, Jun 20, 2014 at 11:28 AM, Raphael Valyi <[hidden email]> wrote:
Hello people,

nice topic indeed.

I also think there is also an option 4:

4) I cannot believe properties can not be made way faster than the current python trickery.

wouldn't that be faster to have properties manipulated say with small PLSQL methods avoiding round tripping between the python and the DB?
or a fields2.propery new implementation in DB possibly with the same surface API?

properties are also a report usability killer the way it is currently. We often hack properties as computed stored fields in OLAP reports...

just thinking loud.


-- 
Raphaël Valyi
Founder and consultant
<a href="tel:%2B55%2021%203942-2434" value="+552139422434" target="_blank">+55 21 3942-2434



On Fri, Jun 20, 2014 at 6:10 AM, Eric Caudal <[hidden email]> wrote:
Hi Joël,
I vote for 3

Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico
          Corp Odoo
          Silver Partner
On 06/20/2014 05:07 PM, Joël Grand-Guillaume wrote:
Hi Eric,


I think the problem is the performance issue... The property field are perfo killer and as this module adds quite lots of read in lot's of places, we already spend time to make it as quick as possible.

A part from that, I agree on the principle, because of course a same product should not have the same costing method in each company...

So, our options:

1) Make different product for each company when costing method isn't the same

2) Add this cost_method field as a property and test it among lots of products and move to ensure it's ok. If yes includer in the price_history module

3) Add this cost_method field as a property in a separate module, letting the us possibility to chose wether to include it or not. I would see this module in the same margin-analysis branch and would love to see a comment in the description of the price_history about that new module.

My2cents,

Joël







On Fri, Jun 20, 2014 at 2:13 AM, Eric Caudal <[hidden email]> wrote:
Hi,
Currently Odoo 7 doesnot handle properly 2 type of costing for separate companies inside the same instance (average cost for company A and standard cost for company B for example).

We are using the product_price_history module for multi-company price logging: would it be a good idea to change the cost_method to property field within this module?

What would be the impact on performance?
What would be the alternative?
--
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico Corp Odoo Silver Partner

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp




--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp





--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Multi-company cost calculation

Raphael Valyi
On Fri, Jun 20, 2014 at 6:32 AM, Joël Grand-Guillaume <[hidden email]> wrote:
hi Raphael,

i agree with you, but I remember it was in the roadmap to improve those proprty field for v8.. Not aware if it has been done or not...

I think I can enlighten you: from what I have been actively following, nothing has been done on properties implementation.

But hey cry not; we have will have command line push of paid CSS theme packages to put some more lip stick on all that ORM hackery...

Well, so of course, then we can fall back on short term solutions like 3)

-- 
Raphaël Valyi
Founder and consultant
+55 21 3942-2434


_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Multi-company cost calculation

Nhomar Hernández
In reply to this post by Joël Grand-Guillaume @ camptocamp

Read the apiculture branch, it was alreadye imrpoved just before opendays.

Regards.

Written from my android

On Jun 20, 2014 4:33 AM, "Joël Grand-Guillaume" <[hidden email]> wrote:
hi Raphael,

i agree with you, but I remember it was in the roadmap to improve those proprty field for v8.. Not aware if it has been done or not...

Anyway, I think for the time being, go for option 3.

Improving property field is needed and must be adressed, but may be not in this context.

Regards,

Joël


On Fri, Jun 20, 2014 at 11:28 AM, Raphael Valyi <[hidden email]> wrote:
Hello people,

nice topic indeed.

I also think there is also an option 4:

4) I cannot believe properties can not be made way faster than the current python trickery.

wouldn't that be faster to have properties manipulated say with small PLSQL methods avoiding round tripping between the python and the DB?
or a fields2.propery new implementation in DB possibly with the same surface API?

properties are also a report usability killer the way it is currently. We often hack properties as computed stored fields in OLAP reports...

just thinking loud.


-- 
Raphaël Valyi
Founder and consultant
<a href="tel:%2B55%2021%203942-2434" value="+552139422434" target="_blank">+55 21 3942-2434



On Fri, Jun 20, 2014 at 6:10 AM, Eric Caudal <[hidden email]> wrote:
Hi Joël,
I vote for 3

Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico
          Corp Odoo
          Silver Partner
On 06/20/2014 05:07 PM, Joël Grand-Guillaume wrote:
Hi Eric,


I think the problem is the performance issue... The property field are perfo killer and as this module adds quite lots of read in lot's of places, we already spend time to make it as quick as possible.

A part from that, I agree on the principle, because of course a same product should not have the same costing method in each company...

So, our options:

1) Make different product for each company when costing method isn't the same

2) Add this cost_method field as a property and test it among lots of products and move to ensure it's ok. If yes includer in the price_history module

3) Add this cost_method field as a property in a separate module, letting the us possibility to chose wether to include it or not. I would see this module in the same margin-analysis branch and would love to see a comment in the description of the price_history about that new module.

My2cents,

Joël







On Fri, Jun 20, 2014 at 2:13 AM, Eric Caudal <[hidden email]> wrote:
Hi,
Currently Odoo 7 doesnot handle properly 2 type of costing for separate companies inside the same instance (average cost for company A and standard cost for company B for example).

We are using the product_price_history module for multi-company price logging: would it be a good idea to change the cost_method to property field within this module?

What would be the impact on performance?
What would be the alternative?
--
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico Corp Odoo Silver Partner

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp




--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp





--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Multi-company cost calculation

Graeme Gellatly
In reply to this post by Joël Grand-Guillaume @ camptocamp
Hi,

I've had a think about this overnight.  Cost method is actually a rarely used field and to my knowledge only at inwards reception and update price to determine whether to update average cost.  It is all the unneeded reads and browses that will kill, therefore my answer is to not read it or browse it.

This is a bit left field but I think would work with zero performance impact on product reads and browses and an O(1) complexity for the needed writes as cost method is only needed one time regardless of number of products.  I accept it is a workaround but thought I'd put it out there.

If product average cost == incoming move cost then average cost behaves like standard cost.
It assumes that one company uses only one cost method.

Set a cost method res_company with new field cost_method - with options of ['average', 'standard']
Set all products to average cost. (If needed this could be added to the module by removing the standard option and an init method)
Hide the cost field in product form(s) - it does nothing anymore.

Then in all workflow create methods (which for me would just be purchasing and manufacturing, but for most just purchasing) which require this field implement an override.  If the company cost method is standard over write the move value with the current average cost.

The only way to then update product cost price is then via the update button.  This would need extension to ensure that incoming unprocessed moves were also updated if company cost method was standard.

But other than overwriting stock_moves cost field where needed (and these create dicts are very accessible) no other functionality needs changing.

Not saying it is ideal or perfect, and I've not fully thought through implications but it does save performance.





On Fri, Jun 20, 2014 at 9:07 PM, Joël Grand-Guillaume <[hidden email]> wrote:
Hi Eric,


I think the problem is the performance issue... The property field are perfo killer and as this module adds quite lots of read in lot's of places, we already spend time to make it as quick as possible.

A part from that, I agree on the principle, because of course a same product should not have the same costing method in each company...

So, our options:

1) Make different product for each company when costing method isn't the same

2) Add this cost_method field as a property and test it among lots of products and move to ensure it's ok. If yes includer in the price_history module

3) Add this cost_method field as a property in a separate module, letting the us possibility to chose wether to include it or not. I would see this module in the same margin-analysis branch and would love to see a comment in the description of the price_history about that new module.

My2cents,

Joël







On Fri, Jun 20, 2014 at 2:13 AM, Eric Caudal <[hidden email]> wrote:
Hi,
Currently Odoo 7 doesnot handle properly 2 type of costing for separate companies inside the same instance (average cost for company A and standard cost for company B for example).

We are using the product_price_history module for multi-company price logging: would it be a good idea to change the cost_method to property field within this module?

What would be the impact on performance?
What would be the alternative?
--
Eric Caudal
CEO
--
Elico Corporation, Shanghai branch
Odoo Premium Certified Training Partner 
Cell: <a href="tel:%2B%2086%20186%202136%201670" value="+8618621361670" target="_blank">+ 86 186 2136 1670
Office: + 86 21 6211 8017/27/37
Skype: elico.corp
[hidden email]
http://www.elico-corp.com

Elico Corp is best Partner Odoo 2014 for Asia-Pacific
Remember: with version 8, OpenERP becomes Odoo!
Elico
        Corp Odoo
        Silver Partner

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp




--


camptocamp
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

Joël Grand-Guillaume
Division Manager
Business Solutions

+41 21 619 10 28



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp