mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[11.0][MIG] account_cost_center
This commit is contained in:
@@ -14,13 +14,13 @@ Costcenter
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/account-financial-tools/tree/10.0/account_cost_center
|
||||
:target: https://github.com/OCA/account-financial-tools/tree/11.0/account_cost_center
|
||||
:alt: OCA/account-financial-tools
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/account-financial-tools-10-0/account-financial-tools-10-0-account_cost_center
|
||||
:target: https://translation.odoo-community.org/projects/account-financial-tools-11-0/account-financial-tools-11-0-account_cost_center
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/92/10.0
|
||||
:target: https://runbot.odoo-community.org/runbot/92/11.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -71,7 +71,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/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/account-financial-tools/issues/new?body=module:%20account_cost_center%0Aversion:%2010.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_cost_center%0Aversion:%2011.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.
|
||||
|
||||
@@ -104,6 +104,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/10.0/account_cost_center>`_ project on GitHub.
|
||||
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/11.0/account_cost_center>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import models
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2016-2018 Onestein (<http://www.onestein.eu>)
|
||||
# Copyright 2016-2019 Onestein (<http://www.onestein.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
@@ -9,7 +8,7 @@
|
||||
'license': 'AGPL-3',
|
||||
'website': 'https://github.com/OCA/account-financial-tools/',
|
||||
'category': 'Accounting',
|
||||
'version': '10.0.1.0.0',
|
||||
'version': '11.0.1.0.0',
|
||||
'depends': [
|
||||
'account',
|
||||
'base_view_inheritance_extension'
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import account_move_line
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Onestein (<http://www.onestein.eu>)
|
||||
# Copyright 2015-2019 Onestein (<http://www.onestein.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Onestein (<http://www.onestein.eu>)
|
||||
# Copyright 2015-2019 Onestein (<http://www.onestein.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Onestein (<http://www.onestein.eu>)
|
||||
# Copyright 2015-2019 Onestein (<http://www.onestein.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
@@ -11,7 +10,7 @@ class AccountInvoiceLine(models.Model):
|
||||
@api.model
|
||||
def _default_cost_center(self):
|
||||
return self.env['account.cost.center'].browse(
|
||||
self._context.get('cost_center_id'))
|
||||
self.env.context.get('cost_center_id'))
|
||||
|
||||
cost_center_id = fields.Many2one(
|
||||
'account.cost.center',
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Onestein (<http://www.onestein.eu>)
|
||||
# Copyright 2015-2019 Onestein (<http://www.onestein.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
@@ -13,11 +12,6 @@ class AccountInvoiceReport(models.Model):
|
||||
string='Cost Center',
|
||||
readonly=True
|
||||
)
|
||||
account_analytic_id = fields.Many2one(
|
||||
'account.analytic.account',
|
||||
string='Analytic Account',
|
||||
readonly=True
|
||||
)
|
||||
|
||||
def _select(self):
|
||||
return super(AccountInvoiceReport, self)._select() + \
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2015-2018 Onestein (<http://www.onestein.eu>)
|
||||
# Copyright 2015-2019 Onestein (<http://www.onestein.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import test_cost_center
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2017-2018 Onestein (<http://www.onestein.eu>)
|
||||
# Copyright 2017-2019 Onestein (<http://www.onestein.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo.tests import common
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
|
||||
<!-- Cost Center menu-->
|
||||
<menuitem id="cost_center_menu"
|
||||
name="Cost Centers"
|
||||
parent="account.menu_analytic_accounting"
|
||||
action="account_cost_center_action"
|
||||
groups="account.group_account_user"
|
||||
|
||||
@@ -5,10 +5,9 @@
|
||||
<field name="model">account.invoice.report</field>
|
||||
<field name="inherit_id" ref="account.view_account_invoice_report_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="user" position="after">
|
||||
<filter string="Analytic Account" context="{'group_by':'account_analytic_id'}" />
|
||||
<filter string="Cost Center" context="{'group_by':'cost_center_id'}" />
|
||||
</filter>
|
||||
<xpath expr="//group/filter[@name='user']" position="after">
|
||||
<filter string="Cost Center" name="cost_center" context="{'group_by':'cost_center_id'}" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user