Skip to content

Commit

Permalink
[MIG] l10n_it_delivery_note: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fredzamoabg committed Dec 11, 2020
1 parent 943c1c6 commit 9f28484
Show file tree
Hide file tree
Showing 39 changed files with 2,708 additions and 2,013 deletions.
74 changes: 34 additions & 40 deletions l10n_it_delivery_note/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,39 @@

# noinspection PyStatementEffect
{
'name': "ITA - Documento di trasporto",
'summary': "Crea, gestisce e fattura i DDT partendo dalle consegne",

'author': "Marco Calcagni, Gianmarco Conte, Link IT Europe Srl, "
"Odoo Community Association (OCA)",
'website': 'https://github.com/OCA/l10n-italy/tree/12.0/'
'l10n_it_delivery_note',
'version': '12.0.1.0.0',
'category': "Localization",
'license': 'AGPL-3',
'maintainers': ['As400it', 'Byloth'],

'depends': [
'delivery',
'l10n_it_delivery_note_base',
'mail',
'sale_stock',
'stock_account'
"name": "ITA - Documento di trasporto",
"summary": "Crea, gestisce e fattura i DDT partendo dalle consegne",
"author": "Marco Calcagni, Gianmarco Conte, Link IT Europe Srl, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-italy" "l10n_it_delivery_note",
"version": "14.0.1.0.0",
"category": "Localization",
"license": "AGPL-3",
"maintainers": ["As400it", "Byloth"],
"depends": [
"delivery",
"l10n_it_delivery_note_base",
"mail",
"sale_stock",
"stock_account",
"product",
],
"data": [
"security/ir_rule.xml",
"security/res_groups.xml",
"security/res_users.xml",
"security/ir.model.access.csv",
"report/report_delivery_note.xml",
"views/account_move.xml",
"views/assets.xml",
"views/res_config_settings.xml",
"views/res_partner.xml",
"views/sale_order.xml",
"views/stock_delivery_note.xml",
"views/stock_picking.xml",
"wizard/delivery_note_create.xml",
"wizard/delivery_note_select.xml",
"wizard/delivery_note_template.xml",
"wizard/sale_advance_payment_inv.xml",
],

'data': [
'security/ir.model.access.csv',
'security/ir_rule.xml',
'security/res_groups.xml',
'security/res_users.xml',

'report/report_delivery_note.xml',

'views/account_invoice.xml',
'views/assets.xml',
'views/res_config_settings.xml',
'views/res_partner.xml',
'views/sale_order.xml',
'views/stock_delivery_note.xml',
'views/stock_picking.xml',

'wizard/delivery_note_create.xml',
'wizard/delivery_note_select.xml',
'wizard/delivery_note_template.xml',
'wizard/sale_advance_payment_inv.xml'
]
}
16 changes: 8 additions & 8 deletions l10n_it_delivery_note/cli/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import argparse
import functools
import logging
import odoo

import odoo
from odoo import SUPERUSER_ID
from odoo.cli import Command

Expand All @@ -15,8 +15,7 @@

def environment(funct=None, parser_args_method=None):
if not funct:
return functools.partial(environment,
parser_args_method=parser_args_method)
return functools.partial(environment, parser_args_method=parser_args_method)

@functools.wraps(funct)
def env_enabler(self, args):
Expand All @@ -31,7 +30,7 @@ def env_enabler(self, args):
config = odoo.tools.config

with odoo.api.Environment.manage():
cr = odoo.registry(config['db_name']).cursor()
cr = odoo.registry(config["db_name"]).cursor()
env = odoo.api.Environment(cr, SUPERUSER_ID, {})

funct(self, command_args, env)
Expand Down Expand Up @@ -70,7 +69,7 @@ def execute(self):
# noinspection PyMethodMayBeStatic
def get_args_parser(self):
args_parser = argparse.ArgumentParser()
args_parser.add_argument('--debug', action='store_true', default=False)
args_parser.add_argument("--debug", action="store_true", default=False)

return args_parser

Expand All @@ -89,9 +88,10 @@ def run(self, args, env):

self._commit()

except:
_logger.exception("Something went wrong during command execution. "
"Rolling back...")
except BaseException:
_logger.exception(
"Something went wrong during command execution. " "Rolling back..."
)

self._rollback()

Expand Down
Loading

0 comments on commit 9f28484

Please sign in to comment.