Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1321 Widoki

Hello,


I have added new field in res.partner model. Added form view to add that field in view.

Then removed view and removed field but now can't able to open form view.

Its raise error that field doesn't exist.


Checked all views but can't see this field. This field is removed from database also.


Can any one please help me to fix this issue?


I upgraded module. Also created one server action to call fields_view_get() but it also not working.


When I try to get fields_view_get from server action like this: I can see that field in fields_view_get(). Tried to remove but not working.


board = self.env['res.partner'].fields_view_get(128, 'form')
if board and 'arch' in board:
xml = ElementTree.fromstring(board['arch'])
arch = ElementTree.tostring(xml, encoding='unicode')
field_reference = xml.xpath("//field[@name='x_Sales_rep']")
​field_reference[0].getparent().remove(field_reference[0])


Thanks.


Regards,

Hemangi.



Awatar
Odrzuć
Najlepsza odpowiedź

Hi,
You can do as follows:

* activate developer mode
* navigate to view menu in settings -> technical -> user interface
* filter the view of res.partner model, search for the removed fields inside View architecture ( paste field in search and choose to search inside architecture)
* there will be some view with the field, remove the view or delete field from view

Thanks

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 22
3388
1
cze 25
1625
3
lip 25
3268
1
maj 25
1415
1
maj 25
1667