From da21626f4a583e1cf77ab57d25faa71c9c3b5cc4 Mon Sep 17 00:00:00 2001 From: C?dric Krier Date: Tue, 9 Jan 2018 15:53:17 +0100 Subject: [PATCH] Fix style --- __init__.py | 4 ++-- invoice.py | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/__init__.py b/__init__.py index 28417c5..c02711f 100644 --- a/__init__.py +++ b/__init__.py @@ -1,10 +1,10 @@ # The COPYRIGHT file at the top level of this repository contains # the full copyright notices and license terms. from trytond.pool import Pool -from .invoice import * +from . import invoice def register(): Pool.register( - Invoice, + invoice.Invoice, module='account_invoice_consecutive', type_='model') diff --git a/invoice.py b/invoice.py index 804ec68..0bc5156 100644 --- a/invoice.py +++ b/invoice.py @@ -15,14 +15,14 @@ class Invoice: super(Invoice, cls).__setup__() cls._error_messages.update({ 'invalid_number_date': 'You are trying to create ' - '%(invoice_number)s invoice on date %(invoice_date)s. ' - 'There are %(invoice_count)d invoices after this date:' - '\n\n%(invoices)s', + '%(invoice_number)s invoice on date %(invoice_date)s. ' + 'There are %(invoice_count)d invoices after this date:' + '\n\n%(invoices)s', 'not_same_dates': 'You are trying to validate an invoice ' - 'where invoice date (%(invoice_date)s) and accounting ' - 'date (%(accounting_date)s) are different. That is not ' - 'permitted, because of invoice number and date ' - 'correlation.', + 'where invoice date (%(invoice_date)s) and accounting ' + 'date (%(accounting_date)s) are different. That is not ' + 'permitted, because of invoice number and date ' + 'correlation.', }) @classmethod @@ -33,11 +33,11 @@ class Invoice: invoice.check_same_dates() def check_same_dates(self): - pool=Pool() + pool = Pool() Lang = pool.get('ir.lang') if (self.invoice_date and self.accounting_date - and self.invoice_date != self.accounting_date): + and self.invoice_date != self.accounting_date): language = Transaction().language languages = Lang.search([('code', '=', language)]) if not languages: