mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
@@ -29,6 +29,7 @@
|
||||
# "partner_identification_unique_by_category",
|
||||
"queue_job",
|
||||
"web_timeline",
|
||||
"partner_identification",
|
||||
],
|
||||
"data": [
|
||||
"security/pms_security.xml",
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
@@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
@@ -300,7 +301,7 @@ span.option {
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
@@ -438,7 +439,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
"queue_job",
|
||||
"base_vat",
|
||||
"l10n_es_aeat",
|
||||
"l10n_es_aeat_partner_identification",
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": [
|
||||
|
||||
@@ -62,37 +62,6 @@ else:
|
||||
<!-- <field name="has_unique_numbers">True</field>-->
|
||||
</record>
|
||||
|
||||
<!-- aeat document type mapped -->
|
||||
<!-- disabled because this is an override of an existe record in this file -->
|
||||
<!-- pylint: disable=redundant-modulename-xml -->
|
||||
<!-- oca-hooks:disable=xml-redundant-module-name -->
|
||||
<record id="pms_l10n_es.document_type_dni" model="res.partner.id_category">
|
||||
<field name="aeat_identification_type">02</field>
|
||||
</record>
|
||||
<record
|
||||
id="pms_l10n_es.document_type_spanish_residence"
|
||||
model="res.partner.id_category"
|
||||
>
|
||||
<field name="aeat_identification_type">05</field>
|
||||
</record>
|
||||
<record
|
||||
id="pms.document_type_european_residence"
|
||||
model="res.partner.id_category"
|
||||
>
|
||||
<field name="aeat_identification_type">05</field>
|
||||
</record>
|
||||
<record id="pms.document_type_passport" model="res.partner.id_category">
|
||||
<field name="aeat_identification_type">03</field>
|
||||
</record>
|
||||
<record id="pms.document_type_driving_license" model="res.partner.id_category">
|
||||
<field name="aeat_identification_type">06</field>
|
||||
</record>
|
||||
<record
|
||||
id="pms.document_type_identification_document"
|
||||
model="res.partner.id_category"
|
||||
>
|
||||
<field name="aeat_identification_type">06</field>
|
||||
</record>
|
||||
<record id="base.es" model="res.country">
|
||||
<field name="priority">10</field>
|
||||
</record>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import logging
|
||||
import re
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
@@ -64,40 +63,3 @@ class PmsCheckinPartner(models.Model):
|
||||
manual_fields = super(PmsCheckinPartner, self)._checkin_manual_fields(depends)
|
||||
manual_fields.extend(["support_number"])
|
||||
return manual_fields
|
||||
|
||||
def _get_partner_by_document(self, document_number, document_type):
|
||||
# if not find partner by documents (super method) then search by
|
||||
# partner fields, VAT, or aeat_identification equivalent
|
||||
partner = super(PmsCheckinPartner, self)._get_partner_by_document(
|
||||
document_number, document_type
|
||||
)
|
||||
document_number = re.sub(r"[^a-zA-Z0-9]", "", document_number).upper()
|
||||
if not partner and document_number and document_type:
|
||||
search_field_name = False
|
||||
if document_type.aeat_identification_type in ["03", "05", "06"]:
|
||||
search_field_name = "aeat_identification"
|
||||
search_comparison = "="
|
||||
elif document_type.aeat_identification_type in ["02", "04"]:
|
||||
# If we have a NIF, we search by VAT (with or without country code)
|
||||
search_field_name = "vat"
|
||||
search_comparison = "=like"
|
||||
document_number = "%" + document_number
|
||||
if search_field_name:
|
||||
partner = self.env["res.partner"].search(
|
||||
[
|
||||
("is_company", "=", False),
|
||||
("is_agency", "=", False),
|
||||
(search_field_name, search_comparison, document_number),
|
||||
],
|
||||
limit=1,
|
||||
)
|
||||
if (
|
||||
partner
|
||||
and partner.vat
|
||||
and len(partner.vat) - len(document_number) > 2
|
||||
):
|
||||
# The country code length is 2, so if the difference is greater than 2
|
||||
# the partner is not the same
|
||||
# TODO: this method need pass country code to search
|
||||
partner = False
|
||||
return partner
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
@@ -9,10 +8,11 @@
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
@@ -301,7 +301,7 @@ span.option {
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
@@ -415,7 +415,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
"license": "AGPL-3",
|
||||
"depends": [
|
||||
"l10n_es_aeat_sii_oca",
|
||||
"l10n_es_aeat_partner_identification",
|
||||
"pms",
|
||||
],
|
||||
"data": ["data/pms_data.xml"],
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
@@ -9,10 +8,11 @@
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
@@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
@@ -301,7 +301,7 @@ span.option {
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
@@ -416,7 +416,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
14.0.20240510.0
|
||||
@@ -1,28 +0,0 @@
|
||||
import setuptools
|
||||
|
||||
with open('VERSION.txt', 'r') as f:
|
||||
version = f.read().strip()
|
||||
|
||||
setuptools.setup(
|
||||
name="odoo14-addons-oca-pms",
|
||||
description="Meta package for oca-pms Odoo addons",
|
||||
version=version,
|
||||
install_requires=[
|
||||
'odoo14-addon-account_asset_pms',
|
||||
'odoo14-addon-mis_builder_pms',
|
||||
'odoo14-addon-multi_pms_properties',
|
||||
'odoo14-addon-pms',
|
||||
'odoo14-addon-pms_account_move_budget',
|
||||
'odoo14-addon-pms_housekeeping',
|
||||
'odoo14-addon-pms_hr_property',
|
||||
'odoo14-addon-pms_l10n_es',
|
||||
'odoo14-addon-pms_l10n_es_sii',
|
||||
'odoo14-addon-pms_rooming_xls',
|
||||
'odoo14-addon-pos_pms_link',
|
||||
],
|
||||
classifiers=[
|
||||
'Programming Language :: Python',
|
||||
'Framework :: Odoo',
|
||||
'Framework :: Odoo :: 14.0',
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user