Skip to content

Commit

Permalink
[FIX] pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
szalatyzuzanna committed Sep 17, 2024
1 parent bcbd0eb commit 4488bfa
Show file tree
Hide file tree
Showing 20 changed files with 542 additions and 523 deletions.
Empty file modified .copier-answers.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/pre-commit.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/stale.yml
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified bc3_importer/LICENSE
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion bc3_importer/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BC3 Connector
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:38bc1203bf2790d2d9824e92585efb60fc59fe150c7bdba0944459f3a1704100
!! source digest: sha256:c34cbd1b192b73e97d7be9a5628abde9082ddd06eb0814fd02f2ce0e47c4c43b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
5 changes: 0 additions & 5 deletions bc3_importer/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@
BC3 Connector.""",
"author": "Binhex, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/vertical-construction",
# Categories can be used to filter modules in modules listing
# Check https://github.com/odoo/odoo/blob/14.0/odoo/addons/base/data/ir_module_category_data.xml
# for the full list
"category": "Sales/Sales",
"version": "14.0.1.0.0",
"license": "AGPL-3",
# any module necessary for this one to work correctly
"depends": ["base", "sale", "project", "uom", "sale_management"],
# always loaded
"data": [
"security/bc3_file_security.xml",
"security/ir.model.access.csv",
Expand Down
2 changes: 1 addition & 1 deletion bc3_importer/models/bc3_file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from odoo import _, api, fields, models, tools
from odoo import fields, models


class Bc3File(models.Model):
Expand Down
44 changes: 37 additions & 7 deletions bc3_importer/models/bc3_version.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import logging
import re

from iteration_utilities import duplicates

from odoo import _, api, fields, models, tools
from odoo.exceptions import UserError, ValidationError
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError

_logger = logging.getLogger(__name__)
import regex


class Bc3Version(models.Model):
Expand Down Expand Up @@ -55,7 +53,13 @@ class Bc3VersionRegister(models.Model):
"Model",
required=True,
ondelete="cascade",
domain="['|','|',('model', '=', 'sale.order'),('model', '=', 'sale.order.line'),('model', '=', 'product.product')]",
domain=[
"|",
"|",
("model", "=", "sale.order"),
("model", "=", "sale.order.line"),
("model", "=", "product.product"),
],
)
edit_existent = fields.Boolean("The register may edit existent records")

Expand All @@ -70,7 +74,20 @@ class Bc3VersionRegisterRule(models.Model):
field_id = fields.Many2one(
"ir.model.fields",
"Field",
domain="[('model_id', '=', model_id),('ttype','not in',['many2one_reference','reference','serialized','job_serialized','selection'])]",
domain=[
("model_id", "=", model_id),
(
"ttype",
"not in",
[
"many2one_reference",
"reference",
"serialized",
"job_serialized",
"selection",
],
),
],
ondelete="cascade",
)
register_id = fields.Many2one(
Expand All @@ -82,6 +99,19 @@ class Bc3VersionRegisterRule(models.Model):
field_ids = fields.Many2many(
"ir.model.fields",
string="Field",
domain="[('model_id', '=', model_id),('ttype','not in',['many2one_reference','reference','serialized','job_serialized','selection'])]",
domain=[
("model_id", "=", model_id),
(
"ttype",
"not in",
[
"many2one_reference",
"reference",
"serialized",
"job_serialized",
"selection",
],
),
],
ondelete="cascade",
)
2 changes: 1 addition & 1 deletion bc3_importer/models/product_product.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from odoo import _, api, fields, models
from odoo import fields, models


class Product(models.Model):
Expand Down
5 changes: 1 addition & 4 deletions bc3_importer/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
from datetime import datetime, timedelta

from odoo import SUPERUSER_ID, _, api, fields, models
from odoo.exceptions import AccessError, UserError, ValidationError
from odoo import fields, models


class SaleOrder(models.Model):
Expand Down
Empty file modified bc3_importer/readme/CONTRIBUTORS.rst
100644 → 100755
Empty file.
Empty file modified bc3_importer/readme/DESCRIPTION.rst
100644 → 100755
Empty file.
Empty file modified bc3_importer/static/description/icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion bc3_importer/static/description/index.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ <h1 class="title">BC3 Connector</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:38bc1203bf2790d2d9824e92585efb60fc59fe150c7bdba0944459f3a1704100
!! source digest: sha256:c34cbd1b192b73e97d7be9a5628abde9082ddd06eb0814fd02f2ce0e47c4c43b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/vertical-construction/tree/14.0/bc3_importer"><img alt="OCA/vertical-construction" src="https://img.shields.io/badge/github-OCA%2Fvertical--construction-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/vertical-construction-14-0/vertical-construction-14-0-bc3_importer"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/vertical-construction&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Importer of quotations in bc3 format.</p>
Expand Down
Loading

0 comments on commit 4488bfa

Please sign in to comment.