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 authored and Borruso committed Jan 15, 2021
1 parent f70ab43 commit d1cf8cc
Show file tree
Hide file tree
Showing 63 changed files with 3,031 additions and 4,146 deletions.
12 changes: 5 additions & 7 deletions l10n_it_delivery_note/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ ITA - Documento di trasporto
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_delivery_note
:target: https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_delivery_note
:alt: OCA/l10n-italy
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_delivery_note
:target: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_delivery_note
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/122/12.0
:target: https://runbot.odoo-community.org/runbot/122/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -56,7 +56,6 @@ Ci sono due impostazioni possibili.
- Base (predefinita): un prelievo, un DDT.
- Avanzata: più prelievi in un DDT.


**Table of contents**

.. contents::
Expand Down Expand Up @@ -150,14 +149,13 @@ Di seguito, una piccola lista di passi da seguire per portare a termine la migra

È possibile iniziare ad utilizzare *l10n_it_delivery_note*.


Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_delivery_note%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_delivery_note%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand Down Expand Up @@ -207,6 +205,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-As400it| |maintainer-Byloth|

This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_delivery_note>`_ project on GitHub.
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_delivery_note>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
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/Italy",
"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 d1cf8cc

Please sign in to comment.