[trunk/7.0] project_crm : sale_order_id does not appear in the correct location on project.task

Bug #1097808 reported by Nicolas JEUDY
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 1

Bug Description

Version: OpenERP 7.0 runbot (and probably others)
How to demonstrate this thanks to a direct bug in runbot:

- launch runbot
- in setting>project, check "allow task delegation"
- In task view, sale_order_id should appear after state located in Extra info page

 code: (project_mrp/project_mrp_view.xml)

       <record id="view_project_mrp_inherit_form2" model="ir.ui.view">
            <field name="name">project.mrp.form.view.inherit</field>
            <field name="model">project.task</field>
            <field name="inherit_id" ref="project.view_task_form2"/>
            <field name="arch" type="xml">
                <field name="state" position="after">
                    <field name="sale_line_id" string="Order Line"/>
                </field>
            </field>
        </record>

but due to the presence of 2 occurrences of "state" labeled fields in the project.task form, inheritance apply only to the first one, which happens to be the wrong. With chance (or bad luck), this bug won't cause exceptions, because the subview happens to support the addition of "sale_line_id". Nevertheless, this causes a silent bug in the replacement of the field. This is what is shown in the video.

project.project_view.xml:

        <field name="arch" type="xml">
                <form string="Project" version="7.0">
                    ....
                    <notebook>
                        ...
                        <page string="Delegation" groups="project.group_delegate_task">
                            ...
                            <field name="child_ids">
                                <tree string="Delegated tasks">
                                    ...
                                    <field name="stage_id"/>
                                    <field name="state" invisible="1"/>
                                    <field name="effective_hours" widget="float_time"/>
                                    ...
                                </tree>
                            </field>
                        </page>
                        <page string="Extra Info" attrs="{'readonly':[('state','=','done')]}">
                            <group col="4">
                                ...
                                <field name="state" invisible="1"/>
                            </group>
                        </page>
                    </notebook>
                    </sheet>
                     ...
                </form>
            </field>

see video

Related branches

Revision history for this message
Nicolas JEUDY (njeudy) wrote :

Use xpath to locate correct state field instead of field name.

Revision history for this message
Nicolas JEUDY (njeudy) wrote :
Changed in openobject-addons:
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Medium
status: In Progress → Confirmed
summary: - [7.0] project_crm : sale_order_id does not appear in the correct
+ [trunk/7.0] project_crm : sale_order_id does not appear in the correct
location on project.task
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Hiral Patel (OpenERP) (hip-openerp) wrote :

Hello,

           For trunk it has been Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1097808-hip
           Revno: 8498
           Revision ID: <email address hidden>

Thanks,
hip

Revision history for this message
Hiral Patel (OpenERP) (hip-openerp) wrote :

Hello,

           For 7.0 it has been Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-bug-1097808-hip
           Revno: 8561
           Revision ID: <email address hidden>

Thanks,
hip

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello Nicolas,
Thanks for reporting this. We have integrated the change into openerp addons 7.0 at revision 9238 (revision-id: <email address hidden>)
It will be forward ported in trunk soon
Regards

Changed in openobject-addons:
status: Fix Committed → Fix Released
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.