Skip to content

Commit

Permalink
[MIG] fiscal_company_point_of_sale: Migration to 16.0 (from 12.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Nov 7, 2024
1 parent 2c940b2 commit 6e37302
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 35 deletions.
9 changes: 7 additions & 2 deletions fiscal_company_point_of_sale/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@

{
"name": "CAE - Point Of Sale",
"version": "12.0.1.2.2",
"version": "16.0.1.0.0",
"category": "CAE",
"summary": "Glue Module between CAE and Point of Sale modules",
"author": "GRAP",
"website": "https://github.com/grap/odoo-addons-cae",
"license": "AGPL-3",
"depends": ["fiscal_company_base", "point_of_sale"],
"depends": [
# Odoo
"point_of_sale",
# GRAP
"fiscal_company_base",
],
"installable": True,
"auto_install": True,
}
2 changes: 1 addition & 1 deletion fiscal_company_point_of_sale/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from . import pos_config
from . import account_bank_statement
from . import account_payment
15 changes: 0 additions & 15 deletions fiscal_company_point_of_sale/models/account_bank_statement.py

This file was deleted.

11 changes: 11 additions & 0 deletions fiscal_company_point_of_sale/models/account_payment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# # Copyright (C) 2020-Today: GRAP (http://www.grap.coop)
# # @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class AccountPayment(models.Model):
_inherit = "account.payment"

force_outstanding_account_id = fields.Many2one(check_company=False)
29 changes: 16 additions & 13 deletions fiscal_company_point_of_sale/models/pos_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def _check_company_invoice_journal(self):
):
raise ValidationError(
_(
"The company of the invoice journal and the company of the point of sale"
"The company of the invoice journal and"
" the company of the point of sale"
" must have the same fiscal company."
)
)
Expand All @@ -33,19 +34,21 @@ def _check_company_journal(self):
):
raise ValidationError(
_(
"The company of the sales journal and the company of the point of sale"
"The company of the sales journal and"
" the company of the point of sale"
" must have the same fiscal company."
)
)

@api.constrains("company_id", "journal_ids")
def _check_company_payment(self):
if self.mapped("journal_ids") and self.mapped(
"journal_ids.company_id.fiscal_company_id.id"
) != [self.company_id.fiscal_company_id.id]:
raise ValidationError(
_(
"The companies of the method payments and the company of the point of sale"
" must have the same fiscal company."
)
)
# @api.constrains("company_id", "journal_ids")
# def _check_company_payment(self):
# if self.mapped("journal_ids") and self.mapped(
# "journal_ids.company_id.fiscal_company_id.id"
# ) != [self.company_id.fiscal_company_id.id]:
# raise ValidationError(
# _(
# "The companies of the method payments and"
# " the company of the point of sale"
# " must have the same fiscal company."
# )
# )
2 changes: 1 addition & 1 deletion fiscal_company_point_of_sale/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This module is a glue module for the Odoo Point of Sale module.

**Features**

Remove bad checks regarding company journals of ``pos.config`` models.
- Remove bad checks regarding company journals of ``pos.config`` models.
3 changes: 0 additions & 3 deletions fiscal_company_point_of_sale/readme/ROADMAP.rst

This file was deleted.

Binary file modified fiscal_company_point_of_sale/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6e37302

Please sign in to comment.