Skip to content

Commit 3937901

Browse files
committed
[T-8592][MIG] partner_code_program_territory_purchase: migration to 18.0
1 parent 929e022 commit 3937901

11 files changed

Lines changed: 559 additions & 48 deletions

File tree

Lines changed: 54 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
1-
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
2-
:target: http://www.gnu.org/licenses/agpl
3-
:alt: License: AGPL-3
4-
5-
=======================================
6-
Partner Code Program Territory Purchase
7-
=======================================
8-
9-
This module adds the partner code program territory in porchase orders and purchase reports
10-
11-
12-
Usage
13-
=====
14-
15-
To use this module, you need to:
16-
17-
#. Create new program territory codes in Contacts / Configuration / Code Programs
18-
#. Edit the code program territory of a partner of type company in the address field of the partner form
19-
#. Create a purchase order with that partner. Now you can filter and group by code program territory
20-
1+
=============================
2+
Partner Code Program Purchase
3+
=============================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:fba1cde7cd9f3f7cfa00fa7ad1e67ddbc06ebd0f1fa4fc6995ed31955e2cb66f
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_territory_purchase
21+
:alt: sygel-technology/sy-partner-contact
22+
23+
|badge1| |badge2| |badge3|
24+
25+
This module adds the partner code program territory in porchase orders
26+
and purchase reports
27+
28+
**Table of contents**
29+
30+
.. contents::
31+
:local:
2132

2233
Installation
2334
============
@@ -26,52 +37,52 @@ To install this module, you need to:
2637

2738
#. Only install
2839

29-
3040
Configuration
3141
=============
3242

3343
To configure this module, you need to:
3444

3545
#. Only install
3646

47+
Usage
48+
=====
49+
50+
To use this module, you need to:
51+
52+
#. Create new program territory codes in Contacts / Configuration / Code
53+
Programs #. Edit the code program territory of a partner of type company
54+
in the address field of the partner form #. Create a purchase order with
55+
that partner. Now you can filter and group by code program territory
3756

3857
Bug Tracker
3958
===========
4059

41-
Bugs and errors are managed in `issues of GitHub <https://github.com/sygel-technology/sy-partner-contact/issues>`_.
42-
In case of problems, please check if your problem has already been
43-
reported. If you are the first to discover it, help us solving it by indicating
44-
a detailed description `here <https://github.com/sygel-technology/sy-partner-contact/issues/new>`_.
60+
Bugs are tracked on `GitHub Issues <https://github.com/sygel-technology/sy-partner-contact/issues>`_.
61+
In case of trouble, please check there if your issue has already been reported.
62+
If you spotted it first, help us to smash it by providing a detailed and welcomed
63+
`feedback <https://github.com/sygel-technology/sy-partner-contact/issues/new?body=module:%20partner_code_program_territory_purchase%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
4564

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

48-
4967
Credits
5068
=======
5169

5270
Authors
53-
~~~~~~~
54-
55-
* Sygel, Odoo Community Association (OCA)
71+
-------
5672

73+
* Sygel
5774

5875
Contributors
59-
~~~~~~~~~~~~
60-
61-
* Valentin Vinagre <valentin.vinagre@sygel.es>
62-
* Alberto Martínez <alberto.martinez@sygel.es>
63-
64-
65-
Maintainer
66-
~~~~~~~~~~
76+
------------
6777

68-
This module is maintained by Sygel.
78+
- `Sygel <https://www.sygel.es>`__:
6979

70-
.. image:: https://www.sygel.es/logo.png
71-
:alt: Sygel
72-
:target: https://www.sygel.es
80+
- Valentín Vinagre
81+
- Alberto Martínez
7382

74-
This module is part of the `Sygel/sy-partner-contact <https://github.com/sygel-technology/sy-partner-contact>`_.
83+
Maintainers
84+
-----------
7585

76-
To contribute to this module, please visit https://github.com/sygel-technology/.
86+
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_territory_purchase>`_ project on GitHub.
7787

88+
You are welcome to contribute.

partner_code_program_territory_purchase/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "Partner Code Program Purchase",
55
"summary": "Adds the partner code program territory fields on purchases",
6-
"version": "17.0.1.0.0",
6+
"version": "18.0.1.0.0",
77
"category": "Partner Management",
88
"website": "https://github.com/sygel-technology/sy-partner-contact",
99
"author": "Sygel",

partner_code_program_territory_purchase/models/purchase_report.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33

44
from odoo import fields, models
5+
from odoo.tools import SQL
56

67

78
class PurchaseReport(models.Model):
@@ -13,10 +14,10 @@ class PurchaseReport(models.Model):
1314
)
1415

1516
def _select(self):
16-
return (
17-
super()._select()
18-
+ ", partner.code_program_territory_id as code_program_territory_id"
17+
return SQL(
18+
"%s, partner.code_program_territory_id as code_program_territory_id",
19+
super()._select(),
1920
)
2021

2122
def _group_by(self):
22-
return super()._group_by() + ", partner.code_program_territory_id"
23+
return SQL("%s, partner.code_program_territory_id", super()._group_by())
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
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module adds the partner code program territory in porchase orders and purchase reports
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
To install this module, you need to:
2+
3+
#. Only install
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
To use this module, you need to:
2+
3+
#. Create new program territory codes in Contacts / Configuration / Code Programs
4+
#. Edit the code program territory of a partner of type company in the address field of the partner form
5+
#. Create a purchase order with that partner. Now you can filter and group by code program territory

0 commit comments

Comments
 (0)