← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 701073] [NEW] attrs attribute not taken in a XML View with a one2many field

 

Public bug reported:

Server : revno. 3231
Client : 6.0.0-rc2
Web-Client : revno. 4287
Web browsers : chromimum-browser (8.0.552.224 (68599) Ubuntu 10.04), firefox (3.6.13)
Plateform : Ubuntu 10.04 LTS

Developing on the CashBox Registers (account module), I encounter a
problem with attrs attribute in the XML View (account_view.xml).

For an example I had a field named 'state', with 'draft' and 'valid' in
a account_bank_statement_line object (account_bank_statement.py).

I modify the XML View (id="inherit_view_bank_statement_form2"). And just
modify a field in the Cash Transactions page. For an example, change
this line :

  <field name="amount"/>

to this one :

  <field name="amount" attrs="{'readonly':[('state','=','valid')]}"/>

Don't forget to add a field named 'state' in the XML View.

Then launch openobject-server and go to Accounting > Bank & Cash > Cash
Registers. The amount field is readable with all state. It should be
readonly when the state 'valid' is written.

Note that this bug appears in the web client. In the GTK Client (6.0.0-rc2) it works.
It also appears on Firefox and Chromium-browser.

** Affects: openobject-client-web
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/701073

Title:
  attrs attribute not taken in a XML View with a one2many field

Status in OpenObject Web Client:
  New

Bug description:
  Server : revno. 3231
Client : 6.0.0-rc2
Web-Client : revno. 4287
Web browsers : chromimum-browser (8.0.552.224 (68599) Ubuntu 10.04), firefox (3.6.13)
Plateform : Ubuntu 10.04 LTS

Developing on the CashBox Registers (account module), I encounter a problem with attrs attribute in the XML View (account_view.xml).

For an example I had a field named 'state', with 'draft' and 'valid' in a account_bank_statement_line object (account_bank_statement.py).

I modify the XML View (id="inherit_view_bank_statement_form2"). And just modify a field in the Cash Transactions page. For an example, change this line : 

  <field name="amount"/>

to this one :

  <field name="amount" attrs="{'readonly':[('state','=','valid')]}"/>

Don't forget to add a field named 'state' in the XML View.

Then launch openobject-server and go to Accounting > Bank & Cash > Cash Registers. The amount field is readable with all state. It should be readonly when the state 'valid' is written.

Note that this bug appears in the web client. In the GTK Client (6.0.0-rc2) it works.
It also appears on Firefox and Chromium-browser.





Follow ups

References