Sale Order Line Items take old Products Description

Bug #654653 reported by Julian Robbins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
JMA(Open ERP)

Bug Description

Using Trunk from version 6.

To replicate

If you take an existing Product, change its Name and Description details.

Create a Sales Order, with a Sales Order Line of the above part. When you search for the above part, you see the updated Description fine; but when it is added to the Sale Order and saved, the Description is using the original Product description, not the newer one. This happens with GTK client and web client ...

Note previously, the Description field wasn't being updated either when used in a sales order form, but this appears to be ok now, but it does indicate that additional fields may have the same issue still.

Tags: crm trunk
Changed in openobject-addons:
assignee: nobody → JMA(Open ERP) (jma-openerp)
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Julian Robbins,

The onchange 'product_id_change' works as expected.
line 1067, sale.py
result['name'] = self.pool.get('product.product').name_get(cr, uid, [product_obj.id], context=context)[0][1]

On the sale order line, select new product once you select the product the description gets updated.
However, if you change the description therein, it will show on the sale order line even after it is saved.

Let us know if I happen to miss out something.
Further if any issues, attach the screen-shots to trace out the problem.

Thanks.

Revision history for this message
Julian Robbins (joolsr) wrote :

There appears to be a lack of continuity between the data held against the product ie Name and Description and what is held on the Sales Order as the Description. E.G. The product we are testing with has 4 X's at the end of its name, and a description for the Product Sales and Description fields in the product set-up, none of which are shown when added to a Sales Order, in fact the 4 X's appears to be either truncated as if the field is not long enough, or just not updated from its earlier form

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Julian Robbins,

In Product form, Under the Description tab you have fields 'Sale Description', 'Purchase Description'.

Whatever description you write in these fields they show up under the tab "Notes" in the 'Sale/Purchase' orderlines when you select a product. In short , your description isn't lost but preserved under the Notes tab.

And regarding the product name, it gets updated on the order line at our end.
There seems to be no issue with that too.

I hope this makes it clear.
Thanks.

Revision history for this message
vrsb (shipilov555) wrote :

Hello.
Do you use Open ERP in English or localized?
First, when a new order line is added, the description field of the order line is filled from original (not translated) name of the product.
Second, when you change name in the product form, that original is not changed by default. So the "old" name may be used as a description of the order line. So you have to click on a "flag" in product form.

2JMA
>result['name'] = self.pool.get('product.product').name_get(cr, uid, [product_obj.id], context=context)[0][1]
Does this work correct with translatable fields?

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Shepilov,

I guess you are just missing out one thing.

The translations are not coming only cause it has no partner language associated to it. So, you need to define the partner language prior to that.

On the Sale order form, open the resource 'Partner' & select the language in which you want the translations.

Later, select the product on the sale order line and the description would get updated too.

Would please re-check with this?

Thanks for your interest.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello guys,

Here come 2 points:

1. Editing the name of the product will not and never affect any ALREADY SAVED instance of product decriptions.
    i.e. I have a product ABC, sale order line of the same product will enlist the same name. I save it.
          Now, if I change the name from ABC to ABCDE, dont expect the description of the sale order line to be changed.
          It is a character field, it won't get changed. You will only see the name of product changed.
          Dynamic changes of relational fields can only be applied to the relational fields themselves,not the relevant non-relational(like char,date,etc.) fields.

2. If more than one languages are loaded, you will only be able to see translated product names if the concerned partner has a language attached with it. (As already said by JMA(OpenERP)).

Let us know if its not clear.

Thanks.

Changed in openobject-addons:
milestone: none → 6.0
status: New → Invalid
Revision history for this message
Julian Robbins (joolsr) wrote :

Hmm

We are not using translations. We are using the standard English version. So i don't believe that makes any difference here.

I agree totally with the comment #6 from Jay, but what we have seen is that editing and changing a product description, is not showing the new description on a completely NEW instance of a Sale Order line.

To reproduce, we have altered one of the demo products, ie '[HDD2], HDD Seagate 7200.8 120GB' to say '[HDD2], HDD Seagate 7200.8 120GB xXXX', ie addition of 'xXXX' to its Name.

Then we create a wholely new sale order. When you type in HDD2, a list of relevant products comes up, with the altered name, i.e. '[HDD2] HDD Seagate 7200.8 120GB xXXX'. Then you press enter, and the Description field takes the original Description without the XXXx, NOT the new one with it. In other words as it is, if you change a Product's name, you can never use the updated product's name, in a Sale Order, it always shows the original one when first entered, which can never be right.

Changed in openobject-addons:
status: Invalid → New
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Julian Robbins,

After having traced the scenario it seems there are no issues at all, the onchange works pretty well.
It does not break neither on gtk or webclient.
Here I attached the screenshots of the behaviour at our end.

Please check with the latest revisions.
Thanks.

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :
Changed in openobject-addons:
status: New → Invalid
Revision history for this message
Julian Robbins (joolsr) wrote : Re: [Bug 654653] Re: Sale Order Line Items take old Products Description

  On 07/10/10 14:43, JMA(Open ERP) wrote:
> Hello Julian Robbins,
>
> After having traced the scenario it seems there are no issues at all, the onchange works pretty well.
> It does not break neither on gtk or webclient.
> Here I attached the screenshots of the behaviour at our end.
Hello again

I have just updated latest sources and created a completely new database.

And I still get exact same problem ! Ie changing a product shows doesn't
show the updated product description on a new sales order. I am using
the web client to do this.

I am just using standard branches of trunk ie no dev ones.

I am definitely still seeing this issue, so it may be worth seeing what
a third party finds

Julian

> Please check with the latest revisions.
> Thanks.
>
> ** Attachment added: "saleproduct_form.png"
> https://bugs.launchpad.net/openobject-addons/+bug/654653/+attachment/1677124/+files/saleproduct_form.png
>

--
Kind Regards,

Julian Robbins
Web Marketing and IT Manager

Q-par Angus Ltd
Barons Cross Laboratories
Leominster
Herefordshire
HR6 8RS
United Kingdom

Telephone +44 (0) 1568 612138
Fax +44 (0) 1568 616373
Web www.q-par.com

IDEAS ENGINEERED - SPECIALISTS IN MICROWAVE and RF ENGINEERING

(Registered office) Incorporated in England No 1826221

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hi Jullian,

I use the following revisions on trunk:
server: 2833,
client: 3447,
addons: 4247.

I go to product and change the name of the product HDD2.

To start, On a sale order line I click on New (empty.png)

Later, I select product HDD2 on the sale order line select product form (select product.png) and save it.
It preserves the value on the sale order line too (saleorder_line.png)

Things work fine with us.
Even we would like to happen to meet the error.
Would you please tell me the steps that you follow?

Thank you.

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :
Revision history for this message
Julian Robbins (joolsr) wrote :

  On 07/10/10 15:36, JMA(Open ERP) wrote:
> Hi Jullian,
>
> I use the following revisions on trunk:
> server: 2833,
> client: 3447,
> addons: 4247.
Ok, I think I've worked it out, although it is a little confusing

In the GTK client, normally we use English UK, which is selected at the
beginning of the install.

When I have English UK, (which is arguably 'standard' English anyway),
set in the Preferences of the GTK client, I do not get an updated
description in a sales order for a product as already said.

But if I change the Language setting in Preferences to just 'English',
and then log out and in again, and then add the amended product to a
Sales Order, I DO get the updated description too :-)

I think in our case, English and English (UK) are seen to be quite
interchangeable, but I am still not sure if when using English (UK), and
not changing any translation fields whatsoever for any objects, products
etc, why the Description for an amended part doesn't follow the same
pattern in a Sales Order and get updated too?

With this in mind, do you think it's best to use English or English
(UK), throughout our install in web or GTK client? If we do not need to
translate objects much, it may be better to just use English rather than
English (UK)? What does using English (UK) actually change for us ? Is
it possible spelling of 'ise' rather than 'ize' ? or is there more to it
than that ?

So there is some issue here, but I pleased that we have at least
resolved the difference with our installs ;-)

Julian
> I go to product and change the name of the product HDD2.
>
> To start, On a sale order line I click on New (empty.png)
>
> Later, I select product HDD2 on the sale order line select product form (select product.png) and save it.
> It preserves the value on the sale order line too (saleorder_line.png)
>
> Things work fine with us.
> Even we would like to happen to meet the error.
> Would you please tell me the steps that you follow?
>
> Thank you.
>

--
Kind Regards,

Julian Robbins
Web Marketing and IT Manager

Q-par Angus Ltd
Barons Cross Laboratories
Leominster
Herefordshire
HR6 8RS
United Kingdom

Telephone +44 (0) 1568 612138
Fax +44 (0) 1568 616373
Web www.q-par.com

IDEAS ENGINEERED - SPECIALISTS IN MICROWAVE and RF ENGINEERING

(Registered office) Incorporated in England No 1826221

Julian Robbins (joolsr)
description: updated
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hi Julian Robbins,

So, finally the issue is of translation.
Whatever language you use should not be a problem but you just need to make sure that you have set the partner language.

I would like you to read the "Comment #5" where things have been explained.

The language that is used when you create the database is 'english_us' by default.
You may load any other official translation later on, but set the partner language.

I hope this would help you.
Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.