Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] fiscal_company_point_of_sale: Migration to 16.0 (from 12.0) #62

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
faac03f
[ADD] 12.0-ADD-fiscal_company_point_of_sale
legalsylvain Jun 12, 2020
119a2bc
[UPD] README.rst
github-grap-bot Jun 12, 2020
b769f4b
fiscal_company_point_of_sale 12.0.1.0.1
github-grap-bot Jun 12, 2020
7db9a77
[FIX] do not block point of sale usage
legalsylvain Jun 17, 2020
7184c8f
fiscal_company_point_of_sale 12.0.1.1.0
github-grap-bot Jun 17, 2020
f9266bc
[FIX] fiscal_company_point_of_sale : make move creation working in C…
legalsylvain Oct 24, 2020
b5a96af
fiscal_company_point_of_sale 12.0.1.1.1
github-grap-bot Oct 24, 2020
7dca254
[FIX] fiscal_company_point_of_sale: make the script working in vario…
legalsylvain Oct 31, 2020
4c218ed
fiscal_company_point_of_sale 12.0.1.1.2
github-grap-bot Oct 31, 2020
e988262
[FIX][DIRTY] fix directly odoo
legalsylvain Nov 6, 2020
52d8604
[UPD] README.rst
github-grap-bot Nov 13, 2020
b30e997
fiscal_company_point_of_sale 12.0.1.1.3
github-grap-bot Nov 13, 2020
6f172d8
[BLACK]
legalsylvain Feb 16, 2021
6f57f00
fiscal_company_point_of_sale 12.0.1.2.0
github-grap-bot Feb 22, 2021
f75385a
[12.0][REF] uniformize website in __manifest__.py + add pre-commit check
legalsylvain Oct 25, 2021
64c5274
[UPD] README.rst
github-grap-bot Oct 26, 2021
c4b5465
[FIX+REF] refactor constrains on pos.config, regarding companies. ada…
legalsylvain Aug 3, 2023
168ae86
fiscal_company_point_of_sale 12.0.1.2.1
github-grap-bot Oct 2, 2023
8c16c66
[BOT] post-merge updates
github-grap-bot Nov 22, 2023
2160e57
[FIX] fiscal_company_point_of_sale: do no raise an error, if there is…
legalsylvain Oct 7, 2024
a13caa3
[BOT] post-merge updates
github-grap-bot Oct 7, 2024
2c940b2
[IMP] fiscal_company_point_of_sale: pre-commit stuff
legalsylvain Nov 7, 2024
6e37302
[MIG] fiscal_company_point_of_sale: Migration to 16.0 (from 12.0)
legalsylvain Nov 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions fiscal_company_point_of_sale/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
===================
CAE - Point Of Sale
===================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6314f09074cb465d9ac3cf7b519bcb7dabaebec4b225f7f29b4d86c2d79c5036
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-grap%2Fodoo--addons--cae-lightgray.png?logo=github
:target: https://github.com/grap/odoo-addons-cae/tree/12.0/fiscal_company_point_of_sale
:alt: grap/odoo-addons-cae

|badge1| |badge2| |badge3|

This module extend Odoo functionnalities, regarding companies features to
manage CAE (Coopearatives of Activities and Employment) that is a special
status for french companies.

This module is a glue module for the Odoo Point of Sale module.

**Features**

Remove bad checks regarding company journals of ``pos.config`` models.

**Table of contents**

.. contents::
:local:

Known issues / Roadmap
======================

To work, you should apply the following patch on Odoo.

- https://github.com/legalsylvain/odoo/tree/12.0-CUSTOM-point_of_sale-disable-switch-company

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/grap/odoo-addons-cae/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/grap/odoo-addons-cae/issues/new?body=module:%20fiscal_company_point_of_sale%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* GRAP

Contributors
~~~~~~~~~~~~

* Sylvain LE GAL <https://twitter.com/legalsylvain>

Maintainers
~~~~~~~~~~~

This module is part of the `grap/odoo-addons-cae <https://github.com/grap/odoo-addons-cae/tree/12.0/fiscal_company_point_of_sale>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions fiscal_company_point_of_sale/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions fiscal_company_point_of_sale/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2014-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).

{
"name": "CAE - Point Of Sale",
"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": [
# Odoo
"point_of_sale",
# GRAP
"fiscal_company_base",
],
"installable": True,
"auto_install": True,
}
45 changes: 45 additions & 0 deletions fiscal_company_point_of_sale/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * fiscal_company_point_of_sale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-03 11:27+0000\n"
"PO-Revision-Date: 2023-08-03 11:27+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: fiscal_company_point_of_sale
#: model:ir.model,name:fiscal_company_point_of_sale.model_account_bank_statement
msgid "Bank Statement"
msgstr "Relevé bancaire"

#. module: fiscal_company_point_of_sale
#: model:ir.model,name:fiscal_company_point_of_sale.model_pos_config
msgid "Point of Sale Configuration"
msgstr "Paramétrage du point de vente"

#. module: fiscal_company_point_of_sale
#: code:addons/fiscal_company_point_of_sale/models/pos_config.py:26
#, python-format
msgid "The companies of the method payments and the company of the point of sale must have the same fiscal company."
msgstr "Les sociétés des méthodes de paiements et la société du point de vente doivent avoir la même société fiscale."

#. module: fiscal_company_point_of_sale
#: code:addons/fiscal_company_point_of_sale/models/pos_config.py:16
#, python-format
msgid "The company of the invoice journal and the company of the point of sale must have the same fiscal company."
msgstr "La société du journal de facturation et la société du point de vente doivent avoir la même société fiscale."

#. module: fiscal_company_point_of_sale
#: code:addons/fiscal_company_point_of_sale/models/pos_config.py:21
#, python-format
msgid "The company of the sales journal and the company of the point of sale must have the same fiscal company."
msgstr "La société des journaux de vente et la société du point de vente doivent avoir la même société fiscale."

2 changes: 2 additions & 0 deletions fiscal_company_point_of_sale/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import pos_config
from . import account_payment
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)
54 changes: 54 additions & 0 deletions fiscal_company_point_of_sale/models/pos_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 _, api, models
from odoo.exceptions import ValidationError


class PosConfig(models.Model):
_inherit = "pos.config"

# Overwrite company constrains
@api.constrains("company_id", "invoice_journal_id")
def _check_company_invoice_journal(self):
if (
self.invoice_journal_id
and self.invoice_journal_id.company_id.fiscal_company_id.id
!= self.company_id.fiscal_company_id.id
):
raise ValidationError(
_(
"The company of the invoice journal and"
" the company of the point of sale"
" must have the same fiscal company."
)
)

@api.constrains("company_id", "journal_id")
def _check_company_journal(self):
if (
self.journal_id
and self.journal_id.company_id.fiscal_company_id.id
!= self.company_id.fiscal_company_id.id
):
raise ValidationError(
_(
"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."
# )
# )
1 change: 1 addition & 0 deletions fiscal_company_point_of_sale/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Sylvain LE GAL <https://twitter.com/legalsylvain>
9 changes: 9 additions & 0 deletions fiscal_company_point_of_sale/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This module extend Odoo functionnalities, regarding companies features to
manage CAE (Coopearatives of Activities and Employment) that is a special
status for french companies.

This module is a glue module for the Odoo Point of Sale module.

**Features**

- Remove bad checks regarding company journals of ``pos.config`` models.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions setup/fiscal_company_point_of_sale/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
Loading