16 lines
478 B
Python
16 lines
478 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import fields, models
|
|
|
|
|
|
class L10n_Mx_EdiResLocality(models.Model):
|
|
_name = 'l10n_mx_edi.res.locality'
|
|
_description = 'Locality'
|
|
|
|
name = fields.Char(required=True, translate=True)
|
|
country_id = fields.Many2one(
|
|
'res.country', string='Country', required=True)
|
|
state_id = fields.Many2one(
|
|
'res.country.state', 'State',
|
|
domain="[('country_id', '=', country_id)]", required=True)
|
|
code = fields.Char()
|