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

[18.0][MIG] purchase_analytic: Migration to 18.0 #732

Closed
wants to merge 58 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
433df28
module to manage analytic on purchase order
Apr 22, 2016
3df393c
[10.0][MIG] port purchase_analytic to V10.0
May 11, 2017
76d25c3
[UPD] Update purchase_analytic.pot
oca-travis Oct 1, 2019
49fd65e
[ADD] icon.png
OCA-git-bot Oct 1, 2019
ab39e88
[MIG] purchase_analytic: Migration to 12.0
MiquelRForgeFlow Oct 23, 2019
0b80e3f
[UPD] Update purchase_analytic.pot
oca-travis Oct 28, 2019
8b45c05
[UPD] README.rst
OCA-git-bot Oct 28, 2019
05d05ee
Update translation files
oca-transbot Nov 5, 2019
8da4761
[IMP] purchase_analytic: black, isort
ps-tubtim Jan 8, 2020
25fb1ce
[MIG] purchase_analytic: Migration to 13.0
ps-tubtim Mar 25, 2020
c969f03
[UPD] Update purchase_analytic.pot
oca-travis Mar 30, 2020
e5d3a4e
Added translation using Weblate (Spanish)
eduardgm Mar 26, 2021
61e262d
[IMP] purchase_analytic: black, isort, prettier
alan196 Nov 29, 2021
b31a20f
[MIG] purchase_analytic: Migration to 15.0
alan196 Nov 29, 2021
cae9e53
[UPD] Update purchase_analytic.pot
May 17, 2022
ee55955
[UPD] README.rst
OCA-git-bot May 17, 2022
6ac3c04
[IMP] purchase_analytic: adapt to newest framework.
LoisRForgeFlow Aug 11, 2022
606ea88
[UPD] Update purchase_analytic.pot
Aug 22, 2022
0887c2a
[UPD] README.rst
OCA-git-bot Aug 22, 2022
57f180d
purchase_analytic 15.0.2.0.0
OCA-git-bot Aug 22, 2022
7021c97
Update translation files
oca-transbot Aug 22, 2022
3316597
[MIG] purchase_analytic: Migration to 16.0
AungKoKoLin1997 Jan 16, 2023
e8b7ce1
analytic_distribution readonly states
AungKoKoLin1997 Feb 2, 2023
66262e8
[UPD] Update purchase_analytic.pot
Feb 11, 2023
52f8421
[UPD] README.rst
OCA-git-bot Feb 11, 2023
b242608
Added translation using Weblate (Croatian)
badbole Feb 16, 2023
943ed17
Translated using Weblate (Croatian)
badbole Feb 16, 2023
b9b4d73
Translated using Weblate (Spanish)
Gelo-fl Apr 12, 2023
d66ace4
Translated using Weblate (French)
sanrav May 8, 2023
0ea9543
[UPD] Update purchase_analytic.pot
May 15, 2023
336af94
Update translation files
weblate May 15, 2023
dd3ad7a
Added translation using Weblate (French (France) (fr_FR))
sanrav May 15, 2023
e10af32
Translated using Weblate (French)
sanrav May 15, 2023
6e70387
Translated using Weblate (French (France) (fr_FR))
sanrav May 15, 2023
c49ebcf
[IMP] purchase_analytic: add default value in order line
AungKoKoLin1997 Jun 5, 2023
cd23a6b
purchase_analytic 16.0.2.0.0
OCA-git-bot Jun 10, 2023
d6c31e6
Added translation using Weblate (Portuguese (Brazil))
adrianojprado Jun 14, 2023
d6829c0
Translated using Weblate (Portuguese (Brazil))
adrianojprado Jun 14, 2023
59d9e02
Translated using Weblate (Spanish)
Ivorra78 Jul 11, 2023
1b41224
[UPD] README.rst
OCA-git-bot Sep 3, 2023
4681408
[FIX] purchase_analytic: Access Denied by ACLs
AungKoKoLin1997 Sep 21, 2023
129e667
[BOT] post-merge updates
OCA-git-bot Sep 21, 2023
af84be0
[TRN] remove fr_FR.po
sbidoul Nov 21, 2023
6dc4350
Added translation using Weblate (Italian)
mymage Feb 23, 2024
da95465
Translated using Weblate (Italian)
mymage Feb 23, 2024
98681f5
[UPD] Update purchase_analytic.pot
Aug 8, 2024
c5a48e5
Update translation files
weblate Aug 8, 2024
b5a1c14
Translated using Weblate (Italian)
mymage Aug 12, 2024
eff7d31
[UPD] Update purchase_analytic.pot
Aug 14, 2024
a13efee
Update translation files
weblate Aug 14, 2024
ac5211a
Translated using Weblate (Italian)
mymage Aug 16, 2024
eb14b1a
Translated using Weblate (Portuguese (Brazil))
SottomaiorMacedoTec Sep 3, 2024
fbabce7
[UPD] Update purchase_analytic.pot
Oct 3, 2024
58086bb
Update translation files
weblate Oct 3, 2024
5dbe26b
Translated using Weblate (Italian)
mymage Oct 3, 2024
5f00e43
Translated using Weblate (Portuguese (Brazil))
SottomaiorMacedoTec Nov 13, 2024
29eb6f0
[IMP] purchase_analytic: pre-commit auto fixes
Jan 9, 2025
1c8c97f
[MIG] purchase_analytic: Migration to 18.0
Jan 15, 2025
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
Prev Previous commit
Next Next commit
[MIG] purchase_analytic: Migration to 12.0
MiquelRForgeFlow authored and Carmen Rondon Regalado committed Jan 9, 2025
commit ab39e889a926eba3e8c1489b7b6bd2ab71c50c81
25 changes: 5 additions & 20 deletions purchase_analytic/README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

=================
@@ -12,43 +12,28 @@ This module add analytic account on purchase order.
If all lines of the purchase order have the same analytic account, the analytic account on the purchase order is automatically set with this value.
If a analytic account is set on the purchase order, all lines of the purchase will take this value.

Installation
============

To install this module, you need to:

* Click on install button

Usage
=====

To use this module, you need to:

* Go to ...

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/142/8.0
:target: https://runbot.odoo-community.org/runbot/142/12.0

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

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

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.

Contributors
------------
2 changes: 0 additions & 2 deletions purchase_analytic/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# -*- coding: utf-8 -*-

from . import models
10 changes: 5 additions & 5 deletions purchase_analytic/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
# © 2016 Laetitia Gangloff, Acsone SA/NV (http://www.acsone.eu)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Purchase Analytic",
"version": "10.0.1.0.0",
"version": "12.0.1.0.0",
'author': "Acsone SA/NV,Odoo Community Association (OCA)",
"category": "Purchase Management",
"website": "http://www.acsone.eu",
"depends": ["purchase"
],
"website": "https://github.com/OCA/account-analytic",
"depends": [
"purchase",
],
"data": ["views/purchase_views.xml"],
"license": "AGPL-3",
"installable": True,
2 changes: 1 addition & 1 deletion purchase_analytic/i18n/purchase_analytic.pot
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
2 changes: 0 additions & 2 deletions purchase_analytic/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# -*- coding: utf-8 -*-

from . import purchase
4 changes: 1 addition & 3 deletions purchase_analytic/models/purchase.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Laetitia Gangloff, Acsone SA/NV (http://www.acsone.eu)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

@@ -10,7 +9,6 @@ class PurchaseOrder(models.Model):

project_id2 = fields.Many2one(
comodel_name='account.analytic.account',
string='Contract / Analytic',
help='Use to store the value of project_id if there is no lines')
project_id = fields.Many2one(
compute='_compute_project_id',
@@ -29,7 +27,7 @@ def _compute_project_id(self):
for po in self:
al = po.project_id2
if po.order_line:
al = (po.order_line[0].account_analytic_id) or False
al = po.order_line[0].account_analytic_id or False
for ol in po.order_line:
if ol.account_analytic_id != al:
al = False
2 changes: 2 additions & 0 deletions purchase_analytic/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Laetitia Gangloff <laetitia.gangloff@acsone.eu>
* Cédric Pigeon <cedric.pigeon@acsone.eu>
5 changes: 5 additions & 0 deletions purchase_analytic/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The goal of this module is to ease analytic account management on purchase order.
This module add analytic account on purchase order.

If all lines of the purchase order have the same analytic account, the analytic account on the purchase order is automatically set with this value.
If a analytic account is set on the purchase order, all lines of the purchase will take this value.
2 changes: 0 additions & 2 deletions purchase_analytic/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# -*- coding: utf-8 -*-

from . import test_purchase_analytic
13 changes: 5 additions & 8 deletions purchase_analytic/tests/test_purchase_analytic.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# -*- coding: utf-8 -*-
# © 2016 Laetitia Gangloff, Acsone SA/NV (http://www.acsone.eu)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

import odoo.tests.common as common
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
from odoo.tests.common import TransactionCase
from datetime import datetime


class TestPurchaseAnalytic(common.TransactionCase):
class TestPurchaseAnalytic(TransactionCase):

def setUp(self):
super(TestPurchaseAnalytic, self).setUp()
self.project = self.env['account.analytic.account'].create({
'name': 'Account Analytic for Tests'
'name': 'Account Analytic for Tests',
})

def test_analytic_account(self):
@@ -29,10 +27,9 @@ def test_analytic_account(self):
'product_id': product_id.id,
'product_qty': 1.0,
'product_uom': self.env.ref(
'product.product_uom_unit').id,
'uom.product_uom_unit').id,
'price_unit': 121.0,
'date_planned': datetime.today().strftime(
DEFAULT_SERVER_DATETIME_FORMAT),
'date_planned': datetime.today(),
})],
})

6 changes: 3 additions & 3 deletions purchase_analytic/views/purchase_views.xml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
<field name="arch" type="xml">
<data>
<field name="create_uid" position="after">
<field name="project_id" groups="purchase.group_analytic_accounting"/>
<field name="project_id" groups="analytic.group_analytic_accounting"/>
</field>
</data>
</field>
@@ -21,7 +21,7 @@
<field name="arch" type="xml">
<data>
<field name="origin" position="before">
<field name="project_id" groups="purchase.group_analytic_accounting"/>
<field name="project_id" groups="analytic.group_analytic_accounting"/>
</field>
</data>
</field>
@@ -35,7 +35,7 @@
<data>
<field name="partner_ref" position="after">
<field name="project_id2" invisible="1" />
<field name="project_id" groups="purchase.group_analytic_accounting"
<field name="project_id" groups="analytic.group_analytic_accounting"
options="{'no_create': True}" />
</field>
<field name="order_line" position="attributes">