Skip to content
Snippets Groups Projects
Commit fec36466d603 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:shirt: black, pylint

parent 9cdfc33c1b8f
No related branches found
No related tags found
1 merge request!21Change for compatibility with account and OCA reports
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
( (
master_doc, master_doc,
"AccountingPeriods", "AccountingPeriods",
u"Accounting periods documentation", "Accounting periods documentation",
author, author,
"AccountingPeriods", "AccountingPeriods",
""" """
......
...@@ -22,9 +22,8 @@ ...@@ -22,9 +22,8 @@
class AccountChartTemplate(models.Model): class AccountChartTemplate(models.Model):
"""Build periods when loading accounting data for a new company. """Build periods when loading accounting data for a new company."""
"""
_inherit = "account.chart.template" _inherit = "account.chart.template"
def _load(self, sale_tax_rate, purchase_tax_rate, company): def _load(self, sale_tax_rate, purchase_tax_rate, company):
...@@ -27,8 +26,8 @@ ...@@ -27,8 +26,8 @@
_inherit = "account.chart.template" _inherit = "account.chart.template"
def _load(self, sale_tax_rate, purchase_tax_rate, company): def _load(self, sale_tax_rate, purchase_tax_rate, company):
""" Installs this chart of accounts on the current company, replacing """Installs this chart of accounts on the current company, replacing
the existing one if it had already one defined. If some accounting the existing one if it had already one defined. If some accounting
entries had already been made, this function fails instead, triggering entries had already been made, this function fails instead, triggering
a UserError. a UserError.
...@@ -47,8 +46,7 @@ ...@@ -47,8 +46,7 @@
return ret return ret
def _load_periods(self, company): def _load_periods(self, company):
"""Build periods when loading accounting data for a new company. """Build periods when loading accounting data for a new company."""
"""
end_date = fields.Date.today().replace( end_date = fields.Date.today().replace(
day=company.fiscalyear_last_day, day=company.fiscalyear_last_day,
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
class AccountFiscalyear(models.Model): class AccountFiscalyear(models.Model):
"""Account fiscal year defined an accounting year. """Account fiscal year defined an accounting year."""
"""
_name = "account.fiscalyear" _name = "account.fiscalyear"
_description = "Fiscal year" _description = "Fiscal year"
...@@ -96,7 +95,7 @@ ...@@ -96,7 +95,7 @@
@api.constrains("date_stop") @api.constrains("date_stop")
def _check_date_stop(self): def _check_date_stop(self):
""" Check end date value when fiscal """Check end date value when fiscal
year last day/month is provided. year last day/month is provided.
""" """
config_fy_month = self.env.company.fiscalyear_last_month # str config_fy_month = self.env.company.fiscalyear_last_month # str
...@@ -160,7 +159,7 @@ ...@@ -160,7 +159,7 @@
return relativedelta(months=12, days=-1) return relativedelta(months=12, days=-1)
def action_realloc_period_am(self): def action_realloc_period_am(self):
""" Call by the "Reallocate Periods" action. """Call by the "Reallocate Periods" action.
Look up all accounts move where periods is empty and Look up all accounts move where periods is empty and
try to reallocate it. try to reallocate it.
......
...@@ -145,7 +145,6 @@ ...@@ -145,7 +145,6 @@
@api.model @api.model
def name_search(self, name="", args=None, operator="ilike", limit=100): def name_search(self, name="", args=None, operator="ilike", limit=100):
"""Override to add company filter. """Override to add company filter."""
"""
args = list(args or []) args = list(args or [])
args.append(("company_id", "=", self.env.company.id)) args.append(("company_id", "=", self.env.company.id))
...@@ -150,6 +149,6 @@ ...@@ -150,6 +149,6 @@
args = list(args or []) args = list(args or [])
args.append(("company_id", "=", self.env.company.id)) args.append(("company_id", "=", self.env.company.id))
return super(AccountPeriod, self).name_search( return super().name_search(
name=name, args=args, operator=operator, limit=limit name=name, args=args, operator=operator, limit=limit
) )
......
...@@ -33,6 +33,5 @@ ...@@ -33,6 +33,5 @@
""" """
def setUp(self): def setUp(self):
"""Set up base elements we are going to use in these tests. """Set up base elements we are going to use in these tests."""
"""
...@@ -38,5 +37,5 @@ ...@@ -38,5 +37,5 @@
super(Test, self).setUp() super().setUp()
# make sure the chart with periods is loaded # make sure the chart with periods is loaded
self.env.user.company_id.chart_template_id._load_periods( self.env.user.company_id.chart_template_id._load_periods(
...@@ -49,8 +48,7 @@ ...@@ -49,8 +48,7 @@
self.product_account = self._createAccount("other") self.product_account = self._createAccount("other")
def test_invoice_dates(self): def test_invoice_dates(self):
"""Check invoice date propagation to accounting documents. """Check invoice date propagation to accounting documents."""
"""
# Find the period around today. We should have one in demo data. # Find the period around today. We should have one in demo data.
today = odoo.fields.Date.today() today = odoo.fields.Date.today()
...@@ -98,8 +96,7 @@ ...@@ -98,8 +96,7 @@
self.assertEqual(accentries.mapped("period_id").id, period_2017_01.id) self.assertEqual(accentries.mapped("period_id").id, period_2017_01.id)
def test_close_period(self): def test_close_period(self):
"""Check the "Close period" dialog box. """Check the "Close period" dialog box."""
"""
# Find the period around today. We should have one in demo data. # Find the period around today. We should have one in demo data.
period_today = self._getPeriod() period_today = self._getPeriod()
......
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
class AccountPeriodClose(models.TransientModel): class AccountPeriodClose(models.TransientModel):
"""Wizard to close a period. """Wizard to close a period."""
"""
_name = "account.period.close" _name = "account.period.close"
_description = "Period closure" _description = "Period closure"
...@@ -35,8 +34,7 @@ ...@@ -35,8 +34,7 @@
) )
def close(self): def close(self):
"""Method to close periods. """Method to close periods."""
"""
self.ensure_one() self.ensure_one()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment