openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #06373
Re: change list price of products
Then all you need to do is call that action when you write exchange rate if
it meets conditions in the simplest case.
Not necessarily the best way, but for you it should work. More than a few
hundred products then maybe not.
e.g
def write(cr, user, vals, context):
res = super(<model., self).write(<args>)
if <field> in vals:
self.pool['product.[template|product]'].<action>(<args>, <kwargs>)
return res
Pseudocode untested, use at your own peril
However, given that this sounds frequent and possibly automated you may
also want to consider modules the historize price such as
product_price_history(ical) I forget under OCA.
On Thu, Jul 3, 2014 at 11:38 AM, hector jahzeel Luna bueso <
hector_5523@xxxxxxxxxxx> wrote:
> Hi community !!
>
> I need help. need to change the price of all my products when the exchange
> rate change.
> In my case the currency of the company is HNL, because i need all my
> invoices in LPS("Lempiras of Honduras") but this pricesare based on dolar
> price.
> Then when the dolar exchange rate change. the price of all my products
> should change.
> I make a function but only update the prices when click on my module,
> need to update them when save the exchange rate.
>
> Regards.
> Hector Luna.
> Grupo Innova.
> Ready Partner.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help : https://help.launchpad.net/ListHelp
>
>
References