Skip to content

Commit aee9ee8

Browse files
Anxo82Sygel-bot
authored andcommitted
[T-8592][MIG] partner_code_program_territory_purchase: migration to 18.0
1 parent da83e5c commit aee9ee8

11 files changed

Lines changed: 582 additions & 50 deletions

File tree

Lines changed: 58 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,90 @@
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
============
2435

2536
To install this module, you need to:
2637

27-
#. Only install
28-
38+
- Only install
2939

3040
Configuration
3141
=============
3242

3343
To configure this module, you need to:
3444

35-
#. Only install
45+
- Only install
3646

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

3859
Bug Tracker
3960
===========
4061

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>`_.
62+
Bugs are tracked on `GitHub Issues <https://github.com/sygel-technology/sy-partner-contact/issues>`_.
63+
In case of trouble, please check there if your issue has already been reported.
64+
If you spotted it first, help us to smash it by providing a detailed and welcomed
65+
`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**>`_.
4566

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

48-
4969
Credits
5070
=======
5171

5272
Authors
53-
~~~~~~~
54-
55-
* Sygel, Odoo Community Association (OCA)
73+
-------
5674

75+
* Sygel
5776

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

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

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

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

76-
To contribute to this module, please visit https://github.com/sygel-technology/.
88+
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.
7789

90+
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+
1. Create new program territory codes in *Contacts \> Configuration \> Code Programs*
4+
2. Edit the code program territory of a partner of type company in the address field of the partner form
5+
3. Create a purchase order with that partner. Now you can filter and group by code program territory

0 commit comments

Comments
 (0)