-
-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! fixup! [FIX] base_delivery_carrier_files: more fixes on migrat…
…ion to 10.0
- Loading branch information
1 parent
947cf64
commit 4e42c31
Showing
6 changed files
with
35 additions
and
87 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
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 |
---|---|---|
@@ -1,23 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
############################################################################## | ||
# | ||
# Author: Guewen Baconnier | ||
# Copyright 2012 Camptocamp SA | ||
# | ||
# 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 2012 Camptocamp SA | ||
# Author: Guewen Baconnier | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import generator | ||
from . import carrier_file | ||
from . 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
This file was deleted.
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,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2012 Camptocamp SA | ||
# Author: Guewen Baconnier | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class DeliveryCarrierFile(models.Model): | ||
_inherit = 'delivery.carrier.file' | ||
|
||
@api.model | ||
def get_type_selection(self): | ||
result = super(DeliveryCarrierFile, self).get_type_selection() | ||
if 'tnt_express_shipper' not in result: | ||
result.append(('tnt_express_shipper', 'TNT Express Shipper')) | ||
return result | ||
|
||
type = fields.Selection(get_type_selection, 'Type', required=True) | ||
tnt_account = fields.Char('TNT Account', size=9) |
File renamed without changes.