[6.0] [Trunk] Purchase expected date wrong value (function field 'fnct_inv' does not work properly in web client)

Bug #696793 reported by Quentin THEURET @Amaris
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Fix Released
Medium
OpenERP R&D Web Team

Bug Description

Create a purchase order, create two lines with two different products and don't define an expected date on the PO.

1st line : Scheduled date = 01/23/2011
2nd line : Scheduled date = 01/13/2011

If you save the PO, the expected date of the PO is today and the scheduled date of two lines is also today whereas it should be 01/13/2011.

After that, if you remove the expected date on the PO, change the scheduled date on lines with the value defined above and save the PO, values are ok.

Values should be ok at the first saving time.

Related branches

description: updated
Revision history for this message
Jamin Shah(OpenERP) (jamin-openerp) wrote :
Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Jamin Shah(OpenERP) (jamin-openerp) wrote :

Hello Quentin,

I have tested your scenario,but it's working as expected.
Would you please check again and notify me?

I have attached screen-shot for your reference.

Thanks.

Revision history for this message
Quentin THEURET @Amaris (qtheuret) wrote :

Hello Jas,

On GTK, the behaviour is good.
It seems that the problem occurs only on Web client because when you create a new PO line, the PO is saved with the date of today as expected date.

On my patch, I remove the computation of expected date if no lines. The expected date isn't a mandatory field, so, if no lines, the PO doesn't need expected date.

I have attached screen-shots for your reference.

Thanks.

Changed in openobject-addons:
status: Incomplete → Confirmed
affects: openobject-addons → openobject-client-web
Changed in openobject-client-web:
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
importance: Undecided → Low
Changed in openobject-client-web:
status: Confirmed → In Progress
Revision history for this message
Jiten (OpenERP) (jiten-openerp) wrote :

Hello,

I have transfered this issue to addons because, i have found that When user try to modify schedule date from purchase order line than first time its modified successfully, but when user save the purchase order than its changed (update - set) by method "_set_minimum_planned_date" of purchase order.
i confirmed it with addons team.

and suggested solution also need to merge ( https://code.launchpad.net/~tempo-openerp/openobject-addons/trunk-bugfix-696793/+merge/45035 )

Please check this issue in purchase.py - line number 66 to 89.
check the value with po.minimum_planned_date.

Thanks.

affects: openobject-client-web → openobject-addons
Changed in openobject-addons:
assignee: OpenERP SA's Web Client R&D (openerp-dev-web) → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
status: In Progress → Confirmed
Revision history for this message
qdp (OpenERP) (qdp) wrote :

the merge proposal is rejected. This should definitelly be fixed in the web client.

qdp (OpenERP) (qdp)
Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 2 (openerp-dev-addons2) → OpenERP SA's Web Client R&D (openerp-dev-web)
affects: openobject-addons → openobject-client-web
Changed in openobject-client-web:
importance: Low → Medium
Changed in openobject-client-web:
assignee: OpenERP SA's Web Client R&D (openerp-dev-web) → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
affects: openobject-client-web → openobject-addons
Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 2 (openerp-dev-addons2) → OpenERP SA's Web Client R&D (openerp-dev-web)
affects: openobject-addons → openobject-client-web
Revision history for this message
Harry (OpenERP) (hmo-tinyerp) wrote :

Hello,

I confirmed this bug into web-client. expected date of the PO is a function field which are calculated base on scheduling date of PO lines. After change of Schedule date of any PO line, expected date of PO is not updated. Web client is sent request to call calculation of expected date but On Save, web client is not consider this new expected date.

Thanks

Revision history for this message
Jiten (OpenERP) (jiten-openerp) wrote :

Hello,

After change of Schedule date of any PO line, expected date of PO is correctly set by "_minimum_planned_date" but its Re-set by "_set_minimum_planned_date" and I found that "_set_minimum_planned_date" works correctly if user changes the expected date by PO only. When user changes the date by PO line then its not working.

WEB client passes all correct fields and values.
GTK works fine because when we change it by PO line and save by final PO then function field is not being passed to server. And that is different structure from WEB.

Correct me if I misunderstood.
Thanks.

Changed in openobject-client-web:
status: Confirmed → Triaged
summary: - [6.0] Purchase expected date wrong value
+ [6.0] [Trunk] Purchase expected date wrong value (function field
+ 'fnct_inv' does not work properly in web client)
Changed in openobject-client-web:
status: Triaged → In Progress
Revision history for this message
Mohammed Shekha(Open ERP) (msh-openerp) wrote :

Hello All,

 The fix for web-client has been committed to
lp:~openerp-dev/openobject-client-web/6.0-opw-4834-msh with the following revision.

Revision-info:
4607 : <email address hidden>
Soon it will be merged into trunk web-client.

Thanks for your patience and co-operation.

Changed in openobject-client-web:
status: In Progress → Fix Committed
Changed in openobject-client-web:
milestone: none → 6.0.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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