Skip to content

Commit cb155cb

Browse files
committed
Merge PR #49 into 18.0
Signed-off-by ValentinVinagre
2 parents 7b67db4 + f37f23b commit cb155cb

19 files changed

Lines changed: 734 additions & 0 deletions
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
============================
2+
Partner Code Program Account
3+
============================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:8d90e8479ee331095a1ec9e80556691b3956775a08f72789b9b61301e01b131d
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-sygel--technology%2Fsy--partner--contact-lightgray.png?logo=github
20+
:target: https://github.com/sygel-technology/sy-partner-contact/tree/18.0/partner_code_program_account
21+
:alt: sygel-technology/sy-partner-contact
22+
23+
|badge1| |badge2| |badge3|
24+
25+
This module adds the partner code program in invoices and invoices
26+
reports
27+
28+
**Table of contents**
29+
30+
.. contents::
31+
:local:
32+
33+
Installation
34+
============
35+
36+
To install this module, you need to:
37+
38+
- Only install
39+
40+
Configuration
41+
=============
42+
43+
To configure this module, you need to:
44+
45+
- Only install
46+
47+
Usage
48+
=====
49+
50+
To use this module, you need to:
51+
52+
1. Create new program codes in Contacts / Configuration / Code Programs
53+
2. Edit the code program of a partner of type company in the address
54+
field of the partner form
55+
3. Create a account move with that partner. Now you can filter and group
56+
by code program
57+
58+
Bug Tracker
59+
===========
60+
61+
Bugs are tracked on `GitHub Issues <https://github.com/sygel-technology/sy-partner-contact/issues>`_.
62+
In case of trouble, please check there if your issue has already been reported.
63+
If you spotted it first, help us to smash it by providing a detailed and welcomed
64+
`feedback <https://github.com/sygel-technology/sy-partner-contact/issues/new?body=module:%20partner_code_program_account%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
65+
66+
Do not contact contributors directly about support or help with technical issues.
67+
68+
Credits
69+
=======
70+
71+
Authors
72+
-------
73+
74+
* Sygel
75+
76+
Contributors
77+
------------
78+
79+
- `Sygel <https://www.sygel.es>`__:
80+
81+
- Valentín Vinagre
82+
- Alberto Martínez
83+
84+
Maintainers
85+
-----------
86+
87+
This module is part of the `sygel-technology/sy-partner-contact <https://github.com/sygel-technology/sy-partner-contact/tree/18.0/partner_code_program_account>`_ project on GitHub.
88+
89+
You are welcome to contribute.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2024 Alberto Martínez <alberto.martinez@sygel.es>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Partner Code Program Account",
5+
"summary": "Adds the partner code program fields on accounting",
6+
"version": "18.0.1.0.0",
7+
"category": "Partner Management",
8+
"website": "https://github.com/sygel-technology/sy-partner-contact",
9+
"author": "Sygel",
10+
"license": "AGPL-3",
11+
"application": False,
12+
"installable": True,
13+
"depends": ["partner_code_program", "account"],
14+
"data": [
15+
"views/account_invoice_report.xml",
16+
"views/account_move.xml",
17+
],
18+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * partner_code_program_account
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 17.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2024-06-06 15:57+0000\n"
10+
"PO-Revision-Date: 2024-06-06 15:57+0000\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: \n"
17+
18+
#. module: partner_code_program_account
19+
#: model:ir.model.fields,field_description:partner_code_program_account.field_account_invoice_report__code_program_id
20+
#: model:ir.model.fields,field_description:partner_code_program_account.field_account_move__code_program_id
21+
#: model_terms:ir.ui.view,arch_db:partner_code_program_account.view_account_invoice_filter_inherit_partner_code_program
22+
#: model_terms:ir.ui.view,arch_db:partner_code_program_account.view_account_invoice_report_search_inherit_partner_code_program
23+
msgid "Code Program"
24+
msgstr "Código de programa"
25+
26+
#. module: partner_code_program_account
27+
#: model:ir.model,name:partner_code_program_account.model_account_invoice_report
28+
msgid "Invoices Statistics"
29+
msgstr "Estadísticas de facturas"
30+
31+
#. module: partner_code_program_account
32+
#: model:ir.model,name:partner_code_program_account.model_account_move
33+
msgid "Journal Entry"
34+
msgstr "Asiento contable"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import account_invoice_report
4+
from . import account_move
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2024 Alberto Martínez <alberto.martinez@sygel.es>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import api, fields, models
5+
from odoo.tools import SQL
6+
7+
8+
class AccountInvoiceReport(models.Model):
9+
_inherit = "account.invoice.report"
10+
11+
code_program_id = fields.Many2one(
12+
string="Code Program",
13+
comodel_name="res.partner.code.program",
14+
)
15+
16+
@api.model
17+
def _select(self) -> SQL:
18+
return SQL("%s, partner.code_program_id AS code_program_id", super()._select())
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright 2024 Alberto Martínez <alberto.martinez@sygel.es>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import models
5+
6+
7+
class AccountMove(models.Model):
8+
_name = "account.move"
9+
_inherit = ["account.move", "res.partner.code.program.mixin"]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
To configure this module, you need to:
2+
3+
- Only install
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- [Sygel](https://www.sygel.es):
2+
- Valentín Vinagre
3+
- Alberto Martínez

0 commit comments

Comments
 (0)