Browse Source
base_import_match: Add conditionals to fields when importing.
base_import_match: Add conditionals to fields when importing.
This patch allows to import res.partner records by VAT when is_company==True by default.14.0
Jairo Llopis
9 years ago
committed by
Jesus Ramoneda
9 changed files with 244 additions and 106 deletions
-
60base_import_match/README.rst
-
2base_import_match/__openerp__.py
-
29base_import_match/data/base_import_match.yml
-
43base_import_match/demo/base_import_match.yml
-
175base_import_match/models/base_import.py
-
5base_import_match/security/ir.model.access.csv
-
4base_import_match/tests/import_data/res_partner_vat.csv
-
10base_import_match/tests/test_import.py
-
22base_import_match/views/base_import_match_view.xml
@ -0,0 +1,29 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
- !context {noupdate: True} |
|||
|
|||
# Match partners by VAT when is_company is True |
|||
- !record {id: res_partner_vat, model: base_import.match}: |
|||
model_id: base.model_res_partner |
|||
sequence: 10 |
|||
|
|||
- !record {id: res_partner_vat_vat, model: base_import.match.field}: |
|||
match_id: res_partner_vat |
|||
field_id: base.field_res_partner_vat |
|||
|
|||
- !record {id: res_partner_vat_is_company, model: base_import.match.field}: |
|||
match_id: res_partner_vat |
|||
field_id: base.field_res_partner_is_company |
|||
conditional: True |
|||
imported_value: "True" |
|||
|
|||
# Match users by login |
|||
- !record {id: res_users_login, model: base_import.match}: |
|||
model_id: base.model_res_users |
|||
sequence: 50 |
|||
|
|||
- !record {id: res_users_login_login, model: base_import.match.field}: |
|||
match_id: res_users_login |
|||
field_id: base.field_res_users_login |
@ -0,0 +1,5 @@ |
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
|||
access_base_import_match,Access base_import.match,model_base_import_match,base.group_user,1,0,0,0 |
|||
access_base_import_match_field,Access base_import.match.field,model_base_import_match_field,base.group_user,1,0,0,0 |
|||
write_base_import_match,Write base_import.match,model_base_import_match,base.group_system,1,1,1,1 |
|||
write_base_import_match_field,Write base_import.match.field,model_base_import_match_field,base.group_system,1,1,1,1 |
@ -1,2 +1,2 @@ |
|||
name,vat |
|||
Federal Changed,BE0477472701 |
|||
name,vat,is_company |
|||
Agrolait Changed,BE0477472701,True |
Write
Preview
Loading…
Cancel
Save
Reference in new issue