[IMP] update dotfiles

This commit is contained in:
oca-git-bot
2024-05-01 18:49:58 +00:00
parent e415b81c9e
commit bef7ccf25f
9 changed files with 35 additions and 24 deletions

View File

@@ -1,7 +1,8 @@
# Do NOT update manually; changes here will be overwritten by Copier # Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.17.2 _commit: v1.21.1
_src_path: https://github.com/OCA/oca-addons-repo-template.git _src_path: https://github.com/OCA/oca-addons-repo-template.git
ci: GitHub ci: GitHub
convert_readme_fragments_to_markdown: false
generate_requirements_txt: true generate_requirements_txt: true
github_check_license: true github_check_license: true
github_ci_extra_env: {} github_ci_extra_env: {}
@@ -19,4 +20,6 @@ repo_description: All-in-One Property Management System (PMS) focused on medium-
repo_name: Property Management System repo_name: Property Management System
repo_slug: pms repo_slug: pms
repo_website: https://github.com/OCA/pms repo_website: https://github.com/OCA/pms
use_pyproject_toml: false
use_ruff: false

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Stale PRs and issues policy - name: Stale PRs and issues policy
uses: actions/stale@v4 uses: actions/stale@v9
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
# General settings. # General settings.
@@ -48,7 +48,7 @@ jobs:
# * Issues that are pending more information # * Issues that are pending more information
# * Except Issues marked as "no stale" # * Except Issues marked as "no stale"
- name: Needs more information stale issues policy - name: Needs more information stale issues policy
uses: actions/stale@v4 uses: actions/stale@v9
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
ascending: true ascending: true

View File

@@ -63,7 +63,9 @@ jobs:
run: oca_init_test_database run: oca_init_test_database
- name: Run tests - name: Run tests
run: oca_run_tests run: oca_run_tests
- uses: codecov/codecov-action@v1 - uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Update .pot files - name: Update .pot files
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@ __pycache__/
*.py[cod] *.py[cod]
/.venv /.venv
/.pytest_cache /.pytest_cache
/.ruff_cache
# C extensions # C extensions
*.so *.so

2
.oca_hooks.cfg Normal file
View File

@@ -0,0 +1,2 @@
[MESSAGES_CONTROL]
disable=xml-deprecated-data-node,xml-deprecated-tree-attribute

View File

@@ -14,6 +14,10 @@ exclude: |
^docs/_templates/.*\.html$| ^docs/_templates/.*\.html$|
# Don't bother non-technical authors with formatting issues in docs # Don't bother non-technical authors with formatting issues in docs
readme/.*\.(rst|md)$| readme/.*\.(rst|md)$|
# Ignore build and dist directories in addons
/build/|/dist/|
# Ignore test files in addons
/tests/samples/.*|
# You don't usually want a bot to modify your legal texts # You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*) (LICENSE.*|COPYING.*)
default_language_version: default_language_version:
@@ -35,7 +39,7 @@ repos:
language: fail language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$' files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/oca/maintainer-tools - repo: https://github.com/oca/maintainer-tools
rev: 969238e47c07d0c40573acff81d170f63245d738 rev: 9a170331575a265c092ee6b24b845ec508e8ef75
hooks: hooks:
# update the NOT INSTALLABLE ADDONS section above # update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons - id: oca-update-pre-commit-excluded-addons
@@ -48,6 +52,7 @@ repos:
- --org-name=OCA - --org-name=OCA
- --repo-name=pms - --repo-name=pms
- --if-source-changed - --if-source-changed
- --keep-source-digest
- repo: https://github.com/OCA/odoo-pre-commit-hooks - repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: v0.0.25 rev: v0.0.25
hooks: hooks:

View File

@@ -1,9 +1,9 @@
from odoo import fields, models, api from odoo import fields, models
class Country(models.Model): class Country(models.Model):
_inherit = 'res.country' _inherit = "res.country"
_description = 'Country' _description = "Country"
_order = 'priority, name' _order = "priority, name"
priority = fields.Integer(string='Priority', default=1000) priority = fields.Integer(string="Priority", default=1000)

View File

@@ -3,7 +3,7 @@
<record id="document_type_dni" model="res.partner.id_category"> <record id="document_type_dni" model="res.partner.id_category">
<field name="name">DNI</field> <field name="name">DNI</field>
<field name="code">D</field> <field name="code">D</field>
<field name="country_ids" eval="[(6, 0, [ref('base.es')])]"/> <field name="country_ids" eval="[(6, 0, [ref('base.es')])]" />
<field name="priority">10</field> <field name="priority">10</field>
<field name="validation_code"> <field name="validation_code">
letters = { letters = {
@@ -48,7 +48,7 @@ else:
<field name="name">Spanish Residence permit</field> <field name="name">Spanish Residence permit</field>
<field name="code">N</field> <field name="code">N</field>
<field name="priority">30</field> <field name="priority">30</field>
<field name="country_ids" eval="[(6, 0, [ref('base.es')])]"/> <field name="country_ids" eval="[(6, 0, [ref('base.es')])]" />
<field name="validation_code"> <field name="validation_code">
permit_first_letter=id_number.name[0:1] permit_first_letter=id_number.name[0:1]
permit_last_letter = id_number.name[ permit_last_letter = id_number.name[
@@ -76,9 +76,9 @@ else:
<field name="aeat_identification_type">05</field> <field name="aeat_identification_type">05</field>
</record> </record>
<record <record
id="pms.document_type_european_residence" id="pms.document_type_european_residence"
model="res.partner.id_category" model="res.partner.id_category"
> >
<field name="aeat_identification_type">05</field> <field name="aeat_identification_type">05</field>
</record> </record>
<record id="pms.document_type_passport" model="res.partner.id_category"> <record id="pms.document_type_passport" model="res.partner.id_category">
@@ -88,9 +88,9 @@ else:
<field name="aeat_identification_type">06</field> <field name="aeat_identification_type">06</field>
</record> </record>
<record <record
id="pms.document_type_identification_document" id="pms.document_type_identification_document"
model="res.partner.id_category" model="res.partner.id_category"
> >
<field name="aeat_identification_type">06</field> <field name="aeat_identification_type">06</field>
</record> </record>
<record id="base.es" model="res.country"> <record id="base.es" model="res.country">

View File

@@ -1,12 +1,10 @@
import base64 import base64
import datetime import datetime
import io
import json import json
import logging import logging
import re import re
import time import time
import PyPDF2
import requests import requests
from bs4 import BeautifulSoup as bs from bs4 import BeautifulSoup as bs
from dateutil.relativedelta import relativedelta from dateutil.relativedelta import relativedelta
@@ -247,9 +245,7 @@ class TravellerReport(models.TransientModel):
"/e-hotel/hospederia/generarInformeFichero" "/e-hotel/hospederia/generarInformeFichero"
) )
post_receipt_acknowledgment_route2 = ( post_receipt_acknowledgment_route2 = "/e-hotel/hospederia/pdfInformeFichero"
"/e-hotel/hospederia/pdfInformeFichero"
)
logout_route = "/e-hotel/execute_logout" logout_route = "/e-hotel/execute_logout"
target_date = self.date_target or fields.date.today() target_date = self.date_target or fields.date.today()
session = requests.session() session = requests.session()
@@ -316,7 +312,9 @@ class TravellerReport(models.TransientModel):
verify=False, verify=False,
data={ data={
"jsonHiddenComunes": "", "jsonHiddenComunes": "",
"ficheroJ": json.loads(upload_result.content.decode('latin-1'))['ficheroJ'], "ficheroJ": json.loads(upload_result.content.decode("latin-1"))[
"ficheroJ"
],
"_csrf": token, "_csrf": token,
}, },
) )