Skip to content

Commit

Permalink
pre-commit changes and test script fixes
Browse files Browse the repository at this point in the history
Added lib

Updated lib

Updated lib

Updated test exclude modules

Updated exclude module list

Updated exclude module list
  • Loading branch information
ByteMeAsap committed Dec 17, 2024
1 parent fbbbdac commit 4c81078
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ jobs:
run: oca_init_test_database
env:
ADDONS_DIR: .,oca,third-party
EXCLUDE: mail_tracking,website_sale_subscription_restrict_cart,l10n_nl_rgs,l10n_nl_rgs_account_financial_report,l10n_nl_rgs_asset,l10n_nl_rgs_mis_report,connector_jira_servicedesk,connector_jira,account_statement_import_file_reconcile_oca,membership_subscription_prorate_variable_period,membership_subscription,membership_prorate,web_leaflet_technical,website_cache_control,account_reconcile_oca,membership_variable_period,base_user_role,account_invoice_constraint_chronology,queue_job,auth_signup_verify_email,base_municipality,argocd_capacity,membership_prorate_variable_period,argocd_website,l10n_nl_account_tax_unece,auditlog,product_contract,subscription_oca,account_banking_mandate_contact,account_banking_sepa_credit_transfer,hr_expense_remove_mobile_link,website_sale_analytics_matomo,mrp_multi_level,mrp_planned_order_matrix,mrp_warehouse_calendar,partner_country_default_nl,partner_external_map,base_menu_visibility_restriction,partner_firstname,password_security,contract,l10n_nl_tax_statement,l10n_nl_xaf_auditfile_export,mass_mailing_partner,mis_builder,website_local_font,helpdesk_mgmt,base_vat_optional_vies,mis_builder_budget,nextcloud_odoo_sync
EXCLUDE: mail_tracking,website_sale_subscription_restrict_cart,l10n_nl_rgs,l10n_nl_rgs_account_financial_report,l10n_nl_rgs_asset,l10n_nl_rgs_mis_report,connector_jira_servicedesk,connector_jira,account_statement_import_file_reconcile_oca,membership_subscription_prorate_variable_period,membership_subscription,membership_prorate,web_leaflet_technical,website_cache_control,account_reconcile_oca,membership_variable_period,base_user_role,account_invoice_constraint_chronology,queue_job,auth_signup_verify_email,base_municipality,argocd_capacity,membership_prorate_variable_period,argocd_website,l10n_nl_account_tax_unece,auditlog,product_contract,subscription_oca,account_banking_mandate_contact,account_banking_sepa_credit_transfer,hr_expense_remove_mobile_link,website_sale_analytics_matomo,mrp_multi_level,mrp_planned_order_matrix,mrp_warehouse_calendar,partner_country_default_nl,partner_external_map,base_menu_visibility_restriction,partner_firstname,password_security,contract,l10n_nl_tax_statement,l10n_nl_xaf_auditfile_export,mass_mailing_partner,mis_builder,website_local_font,helpdesk_mgmt,base_vat_optional_vies,mis_builder_budget,nextcloud_odoo_sync,membership_report,sale_timesheet_approval,sale_timesheet_approval_non_billable,sale_timesheet_approval_sheet
ODOO_VERSION: "16.0"
- name: Run tests
run: oca_run_tests
env:
ADDONS_DIR: .,oca,third-party
EXCLUDE: mail_tracking,website_sale_subscription_restrict_cart,l10n_nl_rgs,l10n_nl_rgs_account_financial_report,l10n_nl_rgs_asset,l10n_nl_rgs_mis_report,connector_jira_servicedesk,connector_jira,account_statement_import_file_reconcile_oca,membership_subscription_prorate_variable_period,membership_subscription,membership_prorate,web_leaflet_technical,website_cache_control,account_reconcile_oca,membership_variable_period,base_user_role,account_invoice_constraint_chronology,queue_job,auth_signup_verify_email,base_municipality,argocd_capacity,membership_prorate_variable_period,argocd_website,l10n_nl_account_tax_unece,auditlog,product_contract,subscription_oca,account_banking_mandate_contact,account_banking_sepa_credit_transfer,hr_expense_remove_mobile_link,website_sale_analytics_matomo,mrp_multi_level,mrp_planned_order_matrix,mrp_warehouse_calendar,partner_country_default_nl,partner_external_map,base_menu_visibility_restriction,partner_firstname,password_security,contract,l10n_nl_tax_statement,l10n_nl_xaf_auditfile_export,mass_mailing_partner,mis_builder,website_local_font,helpdesk_mgmt,base_vat_optional_vies,mis_builder_budget,nextcloud_odoo_sync
EXCLUDE: mail_tracking,website_sale_subscription_restrict_cart,l10n_nl_rgs,l10n_nl_rgs_account_financial_report,l10n_nl_rgs_asset,l10n_nl_rgs_mis_report,connector_jira_servicedesk,connector_jira,account_statement_import_file_reconcile_oca,membership_subscription_prorate_variable_period,membership_subscription,membership_prorate,web_leaflet_technical,website_cache_control,account_reconcile_oca,membership_variable_period,base_user_role,account_invoice_constraint_chronology,queue_job,auth_signup_verify_email,base_municipality,argocd_capacity,membership_prorate_variable_period,argocd_website,l10n_nl_account_tax_unece,auditlog,product_contract,subscription_oca,account_banking_mandate_contact,account_banking_sepa_credit_transfer,hr_expense_remove_mobile_link,website_sale_analytics_matomo,mrp_multi_level,mrp_planned_order_matrix,mrp_warehouse_calendar,partner_country_default_nl,partner_external_map,base_menu_visibility_restriction,partner_firstname,password_security,contract,l10n_nl_tax_statement,l10n_nl_xaf_auditfile_export,mass_mailing_partner,mis_builder,website_local_font,helpdesk_mgmt,base_vat_optional_vies,mis_builder_budget,nextcloud_odoo_sync,membership_report,sale_timesheet_approval,sale_timesheet_approval_non_billable,sale_timesheet_approval_sheet
ODOO_VERSION: "16.0"
- name: Prepare report
run: coverage xml -o coverage.xml --data-file .coverage
Expand Down
4 changes: 2 additions & 2 deletions account_partner_default_account/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class AccountMoveLine(models.Model):
def _compute_account_id(self):
res = super()._compute_account_id()
for line in self.filtered(
lambda l: l.display_type not in ("line_section", "line_note")
and l.move_id.is_invoice()
lambda ml: ml.display_type not in ("line_section", "line_note")
and ml.move_id.is_invoice()
):
partner = line.move_id.partner_id
if partner and partner.partner_default_account_id:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2024 Onestein
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from datetime import date, timedelta
from datetime import timedelta

from pycgapi import CoinGeckoAPI

Expand Down Expand Up @@ -36,7 +36,7 @@ def _obtain_rates(self, base_currency, currencies, date_from, date_to):
return super()._obtain_rates(base_currency, currencies, date_from, date_to)
return self._get_historical_rate_from_coingecko(
date_from, date_to, base_currency
)
)

def _get_historical_rate_from_coingecko(self, date_from, date_to, base_currency):
"""Get all the exchange rates from 'date_from' to 'date_to'"""
Expand All @@ -48,7 +48,7 @@ def _get_historical_rate_from_coingecko(self, date_from, date_to, base_currency)
for (
currency
) in self.currency_ids.res_currency_rate_provider_mapping_ids.filtered(
lambda l: l.provider_service == self.service
lambda rpm: rpm.provider_service == self.service
):
try:
coin_data = api.coin_historical_on_date(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,17 @@ def setUpClass(cls):
}
)
cls.lnk_currency = cls.Currency.create({"name": "LINK", "symbol": "LNK"})
cls.coingecko_provider = cls.CurrencyRateProvider.search(
[("service", "=", "CoinGecko")], limit=1
)
cls.coingecko_provider.company_id = cls.company.id
cls.coingecko_provider_mapping = cls.CurrencyRateProviderMapping.create(
{
"currency_id": cls.lnk_currency.id,
"provider_service": "CoinGecko",
"provider_reference": "chainlink",
}
)
cls.coingecko_provider.write(
cls.coingecko_provider = cls.CurrencyRateProvider.create(
{
"service": "CoinGecko",
"company_id": cls.company.id,
"currency_ids": [
(4, cls.lnk_currency.id),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class ResCurrencyRateProviderMapping(models.Model):
comodel_name="res.currency",
)
provider_service = fields.Selection(
selection=lambda r: r.env["res.currency.rate.provider"]._fields["service"].selection,
selection=lambda r: r.env["res.currency.rate.provider"]
._fields["service"]
.selection,
string="Provider",
required=True,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_01_rgs_balance_sheet(self):

def test_02_rgs_profit_loss(self):
""""""
report = "l10n_nl_rgs_mis_report.mis_report_l10n_nl_rgs_profit_loss"
report = "l10n_nl_rgs_mis_report.mis_report_l10n_nl_rgs_pl"
instance = self.env["mis.report.instance"].create(
{
"name": "Profit Loss",
Expand Down
2 changes: 1 addition & 1 deletion membership_activity/models/project_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _compute_last_membership_activity_date(self):
def get_last_membership_activity_date_by_type(self, type_id_or_xml_id):
self.ensure_one()
activity_type_id = type_id_or_xml_id
if type(type_id_or_xml_id) == str:
if isinstance(type_id_or_xml_id, str):
activity_type_id = self.env.ref(type_id_or_xml_id).id
matching_activities = self.membership_activity_ids.filtered(
lambda a: a.type_id.id == activity_type_id
Expand Down
4 changes: 2 additions & 2 deletions membership_activity_github/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Installation

```
`````````````````````````````
pip3 install PyGithub==1.59.0
```
`````````````````````````````

# Configure

Expand Down
4 changes: 2 additions & 2 deletions membership_activity_gitlab/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Installation

```
``````````````````````````
pip3 install python-gitlab
```
``````````````````````````

# Configure

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ email-validator
suds
cachetools
requests
jira
oauthlib
requests-oauthlib
requests-toolbelt
Expand All @@ -30,3 +29,4 @@ python-slugify
vcrpy
dnspython==2.6.1
pycgapi
bokeh==3.1.1
2 changes: 1 addition & 1 deletion sale_recurring_payment_mollie/models/mollie_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def auto_update_payments(self):
payment_objs = self.sudo()._get_payment_obj(payment["id"])
if payment_objs:
payment_obj = payment_objs.filtered(
lambda l: l.status
lambda po: po.status
not in ["paid", "expired", "canceled", "failed"]
)
if payment_obj and payment_obj.status != payment["status"]:
Expand Down

0 comments on commit 4c81078

Please sign in to comment.