-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,634 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Fábrica de Software Libre (desarrollo@libre.com.ec) | ||
# - Creación de los modelos básicos para cantones y parroquias. | ||
# - Ingreso de datos base para provincias, cantones y parroquias. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
import models | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# -*- coding: utf-8 -*- | ||
{ | ||
'name': "O.T.E. - Ecuador", | ||
|
||
'summary': """Datos de provincias, cantones y parroquias de Ecuador.""", | ||
|
||
'description': """ | ||
Organizacion territorial del Ecuador. | ||
================================================= | ||
* Introduce las modificaciones en res.partner e ingresa la información geopolítica de Ecuador. | ||
* Se ingresan las provincias del Ecuador en res.state. | ||
* Se crea el modelo 'canton' y se ingresan los cantones del Ecuador. | ||
* Se crea el modelo 'parroquia' y se ingresan las parroquias del Ecuador. | ||
* Agrega la información de provincias, cantones y parroquias. | ||
# Data of political division in Ecuador. | ||
* Adds new fields in res_partner to adapt to the way Ecuador manages it's political division. | ||
* Rename "states" as "Provincias" | ||
* Creates "Cantón" wich do not exists and there isn't a usable replacement. | ||
* Creates "Parroquia" wich do not exists and there isn't a usable replacement. | ||
* Adds data to State, Cantón and Parroquia. | ||
""", | ||
|
||
'author': 'Fabrica de Software Libre', | ||
'website': 'www.libre.ec', | ||
|
||
'category': 'Tools', | ||
'version': '9.0.1.0.0', | ||
|
||
# any module necessary for this one to work correctly | ||
'depends': [ | ||
'base', | ||
], | ||
|
||
# always loaded | ||
'data': [ | ||
'views/res_partner.xml', | ||
'data/res.country.state.csv', | ||
'data/l10n_ec_ote.canton.csv', | ||
'data/l10n_ec_ote.parroquia.csv', | ||
], | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"id","code","name","country_id:id" | ||
"base.state_ec_01","01","AZUAY","base.ec" | ||
"base.state_ec_02","02","BOLIVAR","base.ec" | ||
"base.state_ec_03","03","CAÑAR","base.ec" | ||
"base.state_ec_04","04","CARCHI","base.ec" | ||
"base.state_ec_05","05","COTOPAXI","base.ec" | ||
"base.state_ec_06","06","CHIMBORAZO","base.ec" | ||
"base.state_ec_07","07","EL ORO","base.ec" | ||
"base.state_ec_08","08","ESMERALDAS","base.ec" | ||
"base.state_ec_09","09","GUAYAS","base.ec" | ||
"base.state_ec_10","10","IMBABURA","base.ec" | ||
"base.state_ec_11","11","LOJA","base.ec" | ||
"base.state_ec_12","12","LOS RIOS","base.ec" | ||
"base.state_ec_13","13","MANABI","base.ec" | ||
"base.state_ec_14","14","MORONA SANTIAGO","base.ec" | ||
"base.state_ec_15","15","NAPO","base.ec" | ||
"base.state_ec_16","16","PASTAZA","base.ec" | ||
"base.state_ec_17","17","PICHINCHA","base.ec" | ||
"base.state_ec_18","18","TUNGURAHUA","base.ec" | ||
"base.state_ec_19","19","ZAMORA CHINCHIPE","base.ec" | ||
"base.state_ec_20","20","GALAPAGOS","base.ec" | ||
"base.state_ec_21","21","SUCUMBIOS","base.ec" | ||
"base.state_ec_22","22","ORELLANA","base.ec" | ||
"base.state_ec_23","23","SANTO DOMINGO DE LOS TSÁCHILAS","base.ec" | ||
"base.state_ec_24","24","SANTA ELENA","base.ec" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
import ote | ||
import res_partner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from openerp import models, fields | ||
|
||
class Canton(models.Model): | ||
_name = 'l10n_ec_ote.canton' | ||
|
||
state_id = fields.Many2one('res.country.state', ondelete='restrict', string="Provincia", ) | ||
name = fields.Char(string="Cantón") | ||
code = fields.Char(string="Código") | ||
|
||
class Parroquia(models.Model): | ||
_name = 'l10n_ec_ote.parroquia' | ||
|
||
canton_id = fields.Many2one('l10n_ec_ote.canton', | ||
ondelete='restrict', | ||
string="Cantón", ) | ||
name = fields.Char(string="Parroquia") | ||
code = fields.Char(string="Código") | ||
|
||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from openerp import models, fields | ||
|
||
class ResPartner(models.Model): | ||
_inherit = 'res.partner' | ||
|
||
country_id = fields.Many2one(default="base.ec", ) | ||
canton_id = fields.Many2one('l10n_ec_ote.canton', | ||
ondelete='restrict', | ||
string="Cantón", ) | ||
parroquia_id = fields.Many2one('l10n_ec_ote.parroquia', | ||
ondelete='restrict', | ||
string="Parroquia", ) | ||
|
||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0"?> | ||
<openerp> | ||
<data> | ||
|
||
<!-- Partners inherited form --> | ||
<record id="partner_view_form_info" model="ir.ui.view"> | ||
<field name="name">partner.view.info.form.inherit</field> | ||
<field name="model">res.partner</field> | ||
<field name="inherit_id" ref="base.view_partner_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='city']" position="replace"> | ||
</xpath> | ||
<xpath expr="//field[@name='zip']" position="replace"> | ||
</xpath> | ||
<xpath expr="//field[@name='state_id']" position="replace"> | ||
</xpath> | ||
<xpath expr="//field[@name='country_id']" position="after"> | ||
<field name="state_id" | ||
domain="[('country_id', '=', country_id)]" | ||
class="oe_no_button" | ||
placeholder="Provincia" | ||
options="{'no_quick_create':True,'no_create_edit':True}"/> | ||
<field name="canton_id" | ||
domain="[('state_id', '=', state_id)]" | ||
class="oe_no_button" | ||
placeholder="Cantón" | ||
options="{'no_quick_create':True,'no_create_edit':True}"/> | ||
<field name="parroquia_id" | ||
domain="[('canton_id', '=', canton_id)]" | ||
class="oe_no_button" | ||
placeholder="Parroquia" | ||
options="{'no_quick_create':True,'no_create_edit':True}"/> | ||
<field name="city" /> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> |