Skip to content

Commit 52fd116

Browse files
committed
[IMP] bacula2_*: исправления pre-commit перед миграции модулей
1 parent 7ba6db6 commit 52fd116

File tree

10 files changed

+20
-16
lines changed

10 files changed

+20
-16
lines changed

bacula2_contacts/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": """Contacts modifications for Bacula Systems""",
3-
"version": "16.0.0.1.0",
3+
"version": "19.0.0.1.0",
44
"author": "IT-Projects LLC, Eugene Molotov",
55
"support": "it@it-projects.info",
66
"website": "https://github.com/it-projects-llc/bacula-addons",

bacula2_crm/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": """CRM modifications for Bacula Systems""",
3-
"version": "16.0.0.2.0",
3+
"version": "19.0.0.2.0",
44
"author": "IT-Projects LLC, Eugene Molotov",
55
"support": "it@it-projects.info",
66
"website": "https://github.com/it-projects-llc/bacula-addons",

bacula2_crm/models/crm_lead.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from odoo import _, fields, models
1+
from odoo import fields, models
22
from odoo.exceptions import UserError
33

44

@@ -9,5 +9,7 @@ class Lead(models.Model):
99

1010
def _create_customer(self):
1111
if not self.partner_name:
12-
raise UserError(_("Creating customer without company is not allowed"))
12+
raise UserError(
13+
self.env._("Creating customer without company is not allowed")
14+
)
1315
return super()._create_customer()

bacula2_crm/models/digest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytz
44
from dateutil.relativedelta import relativedelta
55

6-
from odoo import _, fields, models
6+
from odoo import fields, models
77
from odoo.exceptions import AccessError
88

99

@@ -30,12 +30,12 @@ def _compute_sale_activity_report_timeframes(self, company):
3030
start_datetime = pytz.timezone(tz_name).localize(start_datetime)
3131
return [
3232
(
33-
_("Future activities"),
33+
self.env._("Future activities"),
3434
start_datetime,
3535
start_datetime + relativedelta(days=1000),
3636
),
3737
(
38-
_("Overdue activities"),
38+
self.env._("Overdue activities"),
3939
start_datetime + relativedelta(days=-1000),
4040
start_datetime,
4141
),
@@ -86,9 +86,9 @@ def _compute_kpis(self, company, user):
8686
)
8787
for index, user_id in enumerate(sales_user_ids):
8888
kpi_values = kpis[index]
89-
kpi_values[
90-
"kpi_action"
91-
] = f"bacula2_crm.user_mail_activity_action&active_id={user_id}"
89+
kpi_values["kpi_action"] = (
90+
f"bacula2_crm.user_mail_activity_action&active_id={user_id}"
91+
)
9292
try:
9393
compute_value = digest._compute_sale_activity_report_value(user_id)
9494
except AccessError:

bacula2_hr_contract/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": """Employee Contracts modifications for Bacula Systems""",
3-
"version": "16.0.0.1.0",
3+
"version": "19.0.0.1.0",
44
"author": "IT-Projects LLC, Eugene Molotov",
55
"support": "it@it-projects.info",
66
"website": "https://github.com/it-projects-llc/bacula-addons",

bacula2_hr_holidays/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": """Time Off modifications for Bacula Systems""",
3-
"version": "16.0.0.1.0",
3+
"version": "19.0.0.1.0",
44
"author": "IT-Projects LLC, Eugene Molotov",
55
"support": "it@it-projects.info",
66
"website": "https://github.com/it-projects-llc/bacula-addons",

bacula2_reports/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": """Reports""",
3-
"version": "16.0.0.1.0",
3+
"version": "19.0.0.1.0",
44
"author": "IT-Projects LLC, Eugene Molotov",
55
"support": "it@it-projects.info",
66
"website": "https://github.com/it-projects-llc/bacula-addons",

bacula2_reports/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
def prepare_pipeline_chart(stages, values, title, descriptions):
3131
# Calculate percentages
3232
percentages = [
33-
f"{(value/values[0]*100 if values[0] else 0):.1f}%" for value in values
33+
f"{(value / values[0] * 100 if values[0] else 0):.1f}%" for value in values
3434
]
3535

3636
# Calculate the coordinates for the funnel segments

bacula2_reports/wizard/sale_report2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def _default_challenge(self):
4646
)
4747
period_end = fields.Date(default=lambda self: fields.Date.today())
4848
challenge = fields.Many2one(
49-
"gamification.challenge", required=True, default=_default_challenge
49+
"gamification.challenge",
50+
required=True,
51+
default=lambda self: self._default_challenge(),
5052
)
5153

5254
currency_id = fields.Many2one("res.currency", related="company.currency_id")

bacula2_sale/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": """Sales modifications for Bacula Systems""",
3-
"version": "16.0.0.1.0",
3+
"version": "19.0.0.1.0",
44
"author": "IT-Projects LLC, Eugene Molotov",
55
"support": "it@it-projects.info",
66
"website": "https://github.com/it-projects-llc/bacula-addons",

0 commit comments

Comments
 (0)