Re: [tryton] Adding validity dates for product supplier price

2016-07-22 Thread Raimon Esteve
2016-07-22 10:33 GMT+02:00 Àngel Àlvarez Serra :
>
>
> 2016-07-22 10:27 GMT+02:00 Cédric Krier :
>>
>> On 2016-07-22 10:09, Àngel Àlvarez Serra wrote:
>> > You can negotiate prices with supplier like :
>> > - 2016:  10 units 1 €
>> > - 2016:  100 units 0.5 €
>> > - 2017: 10 units 0.95€
>> > -2017: 100 units 0.45€
>> >
>> > without start and end date you need to write down on spreadsheet waiting
>> > to
>> > update on your system.
>>
>> Exactly, you do not need to store this information.
>> Also if you know in 2016 the price of 2017, why do you buy in 2016, it
>> is more expensive. And if you know the price of 2017 only in 2017, why
>> do you still need the price of 2016, you can no more buy from there.
>
>
> Because I negotiate 2017 prices on 2016 and i need to store them.

+1

Regards

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/CAN2HbXVGEEyVUsFGSThpkLWsGAipwujv8Huz9L1_W848UV8f7Q%40mail.gmail.com.


Re: [tryton] Adding validity dates for product supplier price

2016-07-22 Thread Cédric Krier
On 2016-07-22 10:33, Àngel Àlvarez Serra wrote:
> 2016-07-22 10:27 GMT+02:00 Cédric Krier :
> 
> > On 2016-07-22 10:09, Àngel Àlvarez Serra wrote:
> > > You can negotiate prices with supplier like :
> > > - 2016:  10 units 1 €
> > > - 2016:  100 units 0.5 €
> > > - 2017: 10 units 0.95€
> > > -2017: 100 units 0.45€
> > >
> > > without start and end date you need to write down on spreadsheet waiting
> > to
> > > update on your system.
> >
> > Exactly, you do not need to store this information.
> > Also if you know in 2016 the price of 2017, why do you buy in 2016, it
> > is more expensive. And if you know the price of 2017 only in 2017, why
> > do you still need the price of 2016, you can no more buy from there.
> >
> 
> Because I negotiate 2017 prices on 2016 and i need to store them.

Store them somewhere else, this is a not scalable design.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20160722084523.GD6791%40tetsuo.


Re: [tryton] Adding validity dates for product supplier price

2016-07-22 Thread Àngel Àlvarez Serra
2016-07-22 10:27 GMT+02:00 Cédric Krier :

> On 2016-07-22 10:09, Àngel Àlvarez Serra wrote:
> > You can negotiate prices with supplier like :
> > - 2016:  10 units 1 €
> > - 2016:  100 units 0.5 €
> > - 2017: 10 units 0.95€
> > -2017: 100 units 0.45€
> >
> > without start and end date you need to write down on spreadsheet waiting
> to
> > update on your system.
>
> Exactly, you do not need to store this information.
> Also if you know in 2016 the price of 2017, why do you buy in 2016, it
> is more expensive. And if you know the price of 2017 only in 2017, why
> do you still need the price of 2016, you can no more buy from there.
>

Because I negotiate 2017 prices on 2016 and i need to store them.


>
> --
> Cédric Krier - B2CK SPRL
> Email/Jabber: cedric.kr...@b2ck.com
> Tel: +32 472 54 46 59
> Website: http://www.b2ck.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "tryton" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tryton/20160722082745.GC6791%40tetsuo.
>



-- 
---
Àngel Àlvarez [ NaN ]
OpenErp Partner
tel: 652439376
www.nan-tic.com

A NaN Creem,Adaptem i Millorem
Programari lliure pel seu Negoci.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/CABkhdr1oaWJeJMMYqb1jTUWiEi4Hj76K%2Bkkz7AUSQDp4RUHeeQ%40mail.gmail.com.


Re: [tryton] Adding validity dates for product supplier price

2016-07-22 Thread Cédric Krier
On 2016-07-22 10:09, Àngel Àlvarez Serra wrote:
> You can negotiate prices with supplier like :
> - 2016:  10 units 1 €
> - 2016:  100 units 0.5 €
> - 2017: 10 units 0.95€
> -2017: 100 units 0.45€
> 
> without start and end date you need to write down on spreadsheet waiting to
> update on your system.

Exactly, you do not need to store this information.
Also if you know in 2016 the price of 2017, why do you buy in 2016, it
is more expensive. And if you know the price of 2017 only in 2017, why
do you still need the price of 2016, you can no more buy from there.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20160722082745.GC6791%40tetsuo.


Re: [tryton] Adding validity dates for product supplier price

2016-07-22 Thread Àngel Àlvarez Serra
2016-07-22 9:17 GMT+02:00 Cédric Krier :

> On 2016-07-22 07:21, Richard PALO wrote:
> > Le 22/07/16 07:08, Cédric Krier a écrit :
> > >> That highly depends on the industry. In some of them, suppliers update
> > >> prices yearly and the company want the new prices to take effect on
> the
> > >> right date. It is also interesting in some cases to know when the new
> > >> prices where given by the supplier and what is the expected "expiry"
> date
> > >> of the price to know if you need to ask for a new quotation or you can
> > >> count on the price you have to make a sale quotation for example.
> > >
> > > Please can you give me an example of such industry?
> > >
> > One common example is any installation service company (electricity,
> plumbing, HVAC, etc...)
>
> But I do not see why such design is needed for this. For me, updating
> the price on the right date is a simple design and probably more
> effective.
> Also the price list of product supplier is just a default and will
> always be. The right price is always given by the supplier.
>
>
>
You can negotiate prices with supplier like :
- 2016:  10 units 1 €
- 2016:  100 units 0.5 €
- 2017: 10 units 0.95€
-2017: 100 units 0.45€

without start and end date you need to write down on spreadsheet waiting to
update on your system.


--
> Cédric Krier - B2CK SPRL
> Email/Jabber: cedric.kr...@b2ck.com
> Tel: +32 472 54 46 59
> Website: http://www.b2ck.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "tryton" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tryton/20160722071735.GX6791%40tetsuo.
>



-- 
---
Àngel Àlvarez [ NaN ]
OpenErp Partner
tel: 652439376
www.nan-tic.com

A NaN Creem,Adaptem i Millorem
Programari lliure pel seu Negoci.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/CABkhdr3YvB7s-3vUju_O6429WXMYTa%3DZg_Ogs3kAoiUzfaKGHw%40mail.gmail.com.


Re: [tryton] Adding validity dates for product supplier price

2016-07-21 Thread Richard PALO
Le 22/07/16 07:08, Cédric Krier a écrit :
>> That highly depends on the industry. In some of them, suppliers update
>> prices yearly and the company want the new prices to take effect on the
>> right date. It is also interesting in some cases to know when the new
>> prices where given by the supplier and what is the expected "expiry" date
>> of the price to know if you need to ask for a new quotation or you can
>> count on the price you have to make a sale quotation for example.
> 
> Please can you give me an example of such industry?
> 
One common example is any installation service company (electricity, plumbing, 
HVAC, etc...)

-- 
Richard PALO

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/5791AD52.6080104%40netbsd.org.


Re: [tryton] Adding validity dates for product supplier price

2016-07-21 Thread Cédric Krier
On 2016-07-21 23:46, Albert Cervera i Areny wrote:
> 2016-07-19 18:08 GMT+02:00 Cédric Krier :
> 
> > On 2016-07-06 06:40, Maxime Richez wrote:
> > > Don't understand, today it's working correctly but i didn't change
> > anything
> > > in my code...
> > >
> > > Should this little feature suggested to the community, or keep it as a
> > > local change ?
> >
> > The problem I see with such feature is that the price list is going to
> > grow indefinitely. Also usually you can not anticipate the change in
> > prices of the supplier so editing with the current price should be good
> > enough.
> >
> 
> That highly depends on the industry. In some of them, suppliers update
> prices yearly and the company want the new prices to take effect on the
> right date. It is also interesting in some cases to know when the new
> prices where given by the supplier and what is the expected "expiry" date
> of the price to know if you need to ask for a new quotation or you can
> count on the price you have to make a sale quotation for example.

Please can you give me an example of such industry?

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20160722050829.GV6791%40tetsuo.


Re: [tryton] Adding validity dates for product supplier price

2016-07-06 Thread Maxime Richez
Don't understand, today it's working correctly but i didn't change anything 
in my code... 

Should this little feature suggested to the community, or keep it as a 
local change ?

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/398cb4b5-a5b9-4024-b00c-634908403733%40googlegroups.com.


Re: [tryton] Adding validity dates for product supplier price

2016-07-06 Thread Cédric Krier
On 2016-07-06 03:21, Maxime Richez wrote:
> 
> >
> >
> > I do not understand. The context inside the execution of 
> > get_purchase_price stays the same. So what do you name "previous 
> > context"? 
> >
> > i mean, inside the method get_purchase_price, the method get_pattern from 
> ProductSupplierPrice is called. Has the method get_pattern the same 
> context  ? because when try to get 'purchase_date' from the context, it 
> doesn't seems to find the variable.

Yes calls inside a method get the same context (except if
Transaction.set_context is called).

> have i choose the best way (see my code) using get_pattern and surcharging 
> "match" method for returning a product supplier price between 2 dates ?

Yes I think.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20160706103309.GD4037%40tetsuo.


Re: [tryton] Adding validity dates for product supplier price

2016-07-06 Thread Maxime Richez

>
>
> I do not understand. The context inside the execution of 
> get_purchase_price stays the same. So what do you name "previous 
> context"? 
>
> i mean, inside the method get_purchase_price, the method get_pattern from 
ProductSupplierPrice is called. Has the method get_pattern the same 
context  ? because when try to get 'purchase_date' from the context, it 
doesn't seems to find the variable.

have i choose the best way (see my code) using get_pattern and surcharging 
"match" method for returning a product supplier price between 2 dates ?

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/e0ad88ac-95c1-465d-a850-811963a447ec%40googlegroups.com.


Re: [tryton] Adding validity dates for product supplier price

2016-07-06 Thread Cédric Krier
On 2016-07-05 01:43, Maxime Richez wrote:
> Hi, 
> 
> I would like to add start_date and  end_date for a product supplier price.
> 
> Here's my code:
> 
> http://pastebin.com/Bm9GwTps
> 
> My problem:
> 
> get_purchase_price method is called  from PurchaseLine with a specific 
> context (purchase_date,...) then get_purchase_price check if there's 
> product_supplier_price matching.
> How to keep previous context to check if purchase_date is between 
> start_date and end_date ?

I do not understand. The context inside the execution of
get_purchase_price stays the same. So what do you name "previous
context"?

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: cedric.kr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20160706101007.GC4037%40tetsuo.


[tryton] Adding validity dates for product supplier price

2016-07-05 Thread Maxime Richez
Hi, 

I would like to add start_date and  end_date for a product supplier price.

Here's my code:

http://pastebin.com/Bm9GwTps

My problem:

get_purchase_price method is called  from PurchaseLine with a specific 
context (purchase_date,...) then get_purchase_price check if there's 
product_supplier_price matching.
How to keep previous context to check if purchase_date is between 
start_date and end_date ?
Thanks for your help !

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/455702b6-8771-4bd2-b5c5-0980632a9aa6%40googlegroups.com.