mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
readonly=True on src_dest_country_code
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
'stock_picking_invoice_link',
|
||||
'sale_stock',
|
||||
'purchase',
|
||||
],
|
||||
],
|
||||
'conflicts': ['report_intrastat'],
|
||||
'data': [
|
||||
'views/hs_code.xml',
|
||||
|
||||
@@ -1,28 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Intrastat Product module for Odoo
|
||||
# Copyright (C) 2011-2016 Akretion (http://www.akretion.com)
|
||||
# Copyright (C) 2009-2016 Noviat (http://www.noviat.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
# Copyright 2011-2017 Akretion (http://www.akretion.com)
|
||||
# Copyright 2009-2017 Noviat
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from openerp import models, fields, api
|
||||
from openerp import api, fields, models
|
||||
|
||||
|
||||
class AccountInvoice(models.Model):
|
||||
@@ -44,7 +25,7 @@ class AccountInvoice(models.Model):
|
||||
'res.country', string='Origin/Destination Country',
|
||||
ondelete='restrict')
|
||||
src_dest_country_code = fields.Char(
|
||||
related='company_id.country_id.code')
|
||||
related='company_id.country_id.code', readonly=True)
|
||||
src_dest_region_id = fields.Many2one(
|
||||
'intrastat.region', string='Origin/Destination Region',
|
||||
default=lambda self: self._default_src_dest_region_id(),
|
||||
|
||||
@@ -1,28 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Intrastat Product module for Odoo
|
||||
# Copyright (C) 2011-2015 Akretion (http://www.akretion.com)
|
||||
# Copyright (C) 2009-2015 Noviat (http://www.noviat.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# @author Luc de Meyer <info@noviat.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
# Copyright 2011-2017 Akretion (http://www.akretion.com)
|
||||
# Copyright 2009-2017 Noviat
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from openerp import models, fields, api
|
||||
from openerp import api, fields, models
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
@@ -47,7 +28,7 @@ class ResCompany(models.Model):
|
||||
string='Intrastat Declaration', store=True, readonly=True,
|
||||
compute='_compute_intrastat')
|
||||
country_code = fields.Char(
|
||||
related='country_id.code')
|
||||
related='country_id.code', readonly=True)
|
||||
intrastat_region_id = fields.Many2one(
|
||||
'intrastat.region',
|
||||
string='Default Intrastat Region')
|
||||
|
||||
@@ -1,26 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Odoo, Open Source Management Solution
|
||||
#
|
||||
# Copyright (c) 2009-2015 Noviat nv/sa (www.noviat.com).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
# Copyright 2009-2017 Noviat
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from openerp import models, fields, api
|
||||
from openerp import api, fields, models
|
||||
|
||||
|
||||
class StockWarehouse(models.Model):
|
||||
@@ -30,7 +12,7 @@ class StockWarehouse(models.Model):
|
||||
'intrastat.region',
|
||||
string='Intrastat region')
|
||||
country_code = fields.Char(
|
||||
related='company_id.country_id.code')
|
||||
related='company_id.country_id.code', readonly=True)
|
||||
|
||||
|
||||
class StockLocation(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user