Re: [tryton-dev] Unable to change Product configuration for Cost Method

2016-10-16 Thread Markus Bala
On Sat, Oct 15, 2016 at 3:29 PM, Cédric Krier  wrote:

> On 2016-10-15 01:09, Markus Bala wrote:
> > Hi,
> >
> > I want to check whether it is a bug or design as per initial.
> >
> > For Product > Configuration > Product, when want to change the value.
> >
> > It call the below method "set_default_cost_price, with the delete
> > "Property". However, the property is the system created record (xml
> below).
> > So whenever want to change the value, system will prevent it due to
> "System
> > Created Record". In other words, it will forever unable to change this
> > value.
> > Is it system design or miss on that?
>
> Please fill an issue.
>

Hi Cedric,

I was register at Tryton list. It said need to wait for email confirmation.
However, I am still not received yet.

So unable to register the issue yet

>
> --
> 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-dev" group.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/tryton-dev/20161015082939.GY99626%40tetsuo.
>

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


Re: [tryton-dev] Unable to change Product configuration for Cost Method

2016-10-15 Thread Cédric Krier
On 2016-10-15 01:09, Markus Bala wrote:
> Hi,
> 
> I want to check whether it is a bug or design as per initial.
> 
> For Product > Configuration > Product, when want to change the value. 
> 
> It call the below method "set_default_cost_price, with the delete 
> "Property". However, the property is the system created record (xml below).
> So whenever want to change the value, system will prevent it due to "System 
> Created Record". In other words, it will forever unable to change this 
> value.
> Is it system design or miss on that?

Please fill an issue.

-- 
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-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/20161015082939.GY99626%40tetsuo.


[tryton-dev] Unable to change Product configuration for Cost Method

2016-10-15 Thread Markus Bala
Hi,

I want to check whether it is a bug or design as per initial.

For Product > Configuration > Product, when want to change the value. 

It call the below method "set_default_cost_price, with the delete 
"Property". However, the property is the system created record (xml below).
So whenever want to change the value, system will prevent it due to "System 
Created Record". In other words, it will forever unable to change this 
value.
Is it system design or miss on that?


@classmethod
def set_default_cost_price_method(cls, configurations, name, value):
pool = Pool()
Property = pool.get('ir.property')
field = cls._get_product_field('cost_price_method')
properties = Property.search([
('field', '=', field.id),
('res', '=', None),
])
*Property.delete(properties)*
if value:
Property.create([{
'field': field.id,
'value': ',%s' % value,
}])




,fixed



-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/177d01f2-9814-49ba-a446-6336b76af337%40googlegroups.com.