Community mailing list archives

community@mail.odoo.com

Re: Add data to Many2many using search in XML

by
Alien Group Lda, Alaney Kilson Dória
- 06/03/2016 10:05:08

Just to close this, It's possible to do what I wanted.

ALIEN GROUP LDA

Alaney Dória

CEO | Odoo Consultant

em.alaney.doria@alien-group.com

tm.+244 913 728 600

Linkedin Facebook Facebook
Código QR

Rua Doutor Agostinho Neto, 156, Bairro Azul, Luanda - Angola, Tel: +244 913 728 600 | +244 913 728 650,
Website: www.alien-group.com, Email: geral@alien-group.com

Não imprima este email caso não seja estritamente necessário. A Terra agradece-lhe!

On 06/02/2016 07:22 AM, Holger Brunn wrote:
> it is not possible to use a 'search' in xml.

yes it is:
https://github.com/odoo/odoo/blob/9.0/openerp/tools/convert.py#L97

A syntax in the lines of



should do what you want.

But it's nearly never a good idea to do this. Better declare the records
in question in XML anyways, and write a pre-migration script that
creates the XML ids in question. An example can be found here:
https://github.com/OCA/OpenUpgrade/blob/8.0/addons/stock/migrations/8.0.1.1/post-migration.py#L488


-- 
Therp - Maatwerk in open ontwikkeling

Holger Brunn - Ontwerp en implementatie

mail: holger@therp.nl
web: http://therp.nl
phone: +31 (0)20 3093096

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe