cubells
8 years ago
committed by
Pedro M. Baeza
12 changed files with 104 additions and 92 deletions
-
9base_import_match/README.rst
-
3base_import_match/__init__.py
-
12base_import_match/__openerp__.py
-
33base_import_match/data/base_import_match.xml
-
29base_import_match/data/base_import_match.yml
-
45base_import_match/demo/base_import_match.xml
-
40base_import_match/demo/base_import_match.yml
-
3base_import_match/models/__init__.py
-
5base_import_match/models/base_import.py
-
3base_import_match/tests/__init__.py
-
3base_import_match/tests/test_import.py
-
9base_import_match/views/base_import_match_view.xml
@ -1,5 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis |
|||
# Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis |
|||
# Copyright 2016 Tecnativa - Vicent Cubells |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import models |
@ -0,0 +1,33 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis |
|||
Copyright 2016 Tecnativa - Vicent Cubells |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> |
|||
|
|||
<odoo noupdate="1"> |
|||
<!-- Match partners by VAT when is_company is True --> |
|||
<record model="base_import.match" id="res_partner_vat"> |
|||
<field name="model_id" eval="ref('base.model_res_partner')"/> |
|||
<field name="sequence" type="int">10</field> |
|||
</record> |
|||
<record model="base_import.match.field" id="res_partner_vat_vat"> |
|||
<field name="match_id" ref="base_import_match.res_partner_vat"/> |
|||
<field name="field_id" ref="base.field_res_partner_vat"/> |
|||
</record> |
|||
<record model="base_import.match.field" id="res_partner_vat_is_company"> |
|||
<field name="match_id" ref="base_import_match.res_partner_vat"/> |
|||
<field name="field_id" ref="base.field_res_partner_is_company"/> |
|||
<field name="conditional">True</field> |
|||
<field name="imported_value">True</field> |
|||
</record> |
|||
|
|||
<!-- Match users by login --> |
|||
<record model="base_import.match" id="res_users_login"> |
|||
<field name="model_id" eval="ref('base.model_res_users')"/> |
|||
<field name="sequence" type="int">50</field> |
|||
</record> |
|||
<record model="base_import.match.field" id="res_users_login_login"> |
|||
<field name="match_id" ref="base_import_match.res_users_login"/> |
|||
<field name="field_id" ref="base.field_res_users_login"/> |
|||
</record> |
|||
|
|||
</odoo> |
@ -1,29 +0,0 @@ |
|||
# -*- 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,45 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis |
|||
Copyright 2016 Tecnativa - Vicent Cubells |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> |
|||
<odoo noupdate="1"> |
|||
|
|||
<!-- Match partners by name, parent_id and is_company --> |
|||
<record model="base_import.match" id="res_partner_parent_name_is_company"> |
|||
<field name="model_id" eval="ref('base.model_res_partner')"/> |
|||
<field name="sequence" type="int">20</field> |
|||
</record> |
|||
<record model="base_import.match.field" id="res_partner_parent_name_is_company_name"> |
|||
<field name="match_id" ref="res_partner_parent_name_is_company"/> |
|||
<field name="field_id" ref="base.field_res_partner_name"/> |
|||
</record> |
|||
<record model="base_import.match.field" id="res_partner_parent_name_is_company_parent"> |
|||
<field name="match_id" ref="res_partner_parent_name_is_company"/> |
|||
<field name="field_id" ref="base.field_res_partner_parent_id"/> |
|||
</record> |
|||
<record model="base_import.match.field" id="res_partner_parent_name_is_company_is_company"> |
|||
<field name="match_id" ref="res_partner_parent_name_is_company"/> |
|||
<field name="field_id" ref="base.field_res_partner_is_company"/> |
|||
</record> |
|||
|
|||
<!-- Match partner by email --> |
|||
<record model="base_import.match" id="res_partner_email"> |
|||
<field name="model_id" eval="ref('base.model_res_partner')"/> |
|||
<field name="sequence" type="int">30</field> |
|||
</record> |
|||
<record model="base_import.match.field" id="res_partner_email_email"> |
|||
<field name="match_id" ref="base_import_match.res_partner_email"/> |
|||
<field name="field_id" ref="base.field_res_partner_email"/> |
|||
</record> |
|||
|
|||
<!-- Match partner by name --> |
|||
<record model="base_import.match" id="res_partner_name"> |
|||
<field name="model_id" eval="ref('base.model_res_partner')"/> |
|||
<field name="sequence" type="int">40</field> |
|||
</record> |
|||
<record model="base_import.match.field" id="res_partner_name_name"> |
|||
<field name="match_id" ref="base_import_match.res_partner_name"/> |
|||
<field name="field_id" ref="base.field_res_partner_name"/> |
|||
</record> |
|||
|
|||
</odoo> |
@ -1,40 +0,0 @@ |
|||
# -*- 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 name, parent_id and is_company |
|||
- !record {id: res_partner_parent_name_is_company, model: base_import.match}: |
|||
model_id: base.model_res_partner |
|||
sequence: 20 |
|||
|
|||
- !record {id: res_partner_parent_name_is_company_name, model: base_import.match.field}: |
|||
match_id: res_partner_parent_name_is_company |
|||
field_id: base.field_res_partner_name |
|||
|
|||
- !record {id: res_partner_parent_name_is_company_parent, model: base_import.match.field}: |
|||
match_id: res_partner_parent_name_is_company |
|||
field_id: base.field_res_partner_parent_id |
|||
|
|||
- !record {id: res_partner_parent_name_is_company_is_company, model: base_import.match.field}: |
|||
match_id: res_partner_parent_name_is_company |
|||
field_id: base.field_res_partner_is_company |
|||
|
|||
# Match partner by email |
|||
- !record {id: res_partner_email, model: base_import.match}: |
|||
model_id: base.model_res_partner |
|||
sequence: 30 |
|||
|
|||
- !record {id: res_partner_email_email, model: base_import.match.field}: |
|||
match_id: res_partner_email |
|||
field_id: base.field_res_partner_email |
|||
|
|||
# Match partner by name |
|||
- !record {id: res_partner_name, model: base_import.match}: |
|||
model_id: base.model_res_partner |
|||
sequence: 40 |
|||
|
|||
- !record {id: res_partner_name_name, model: base_import.match.field}: |
|||
match_id: res_partner_name |
|||
field_id: base.field_res_partner_name |
@ -1,5 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis |
|||
# Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis |
|||
# Copyright 2016 Tecnativa - Vicent Cubells |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import base_import |
@ -1,5 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# © 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis |
|||
# Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis |
|||
# Copyright 2016 Tecnativa - Vicent Cubells |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import test_import |
Write
Preview
Loading…
Cancel
Save
Reference in new issue