account_move_template: Migration to 11.0
This commit is contained in:
parent
48603ddf7f
commit
1fd226a7ea
@ -1,3 +1,8 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
||||||
|
:target: https://www.gnu.org/licenses/agpl
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
=====================================================
|
||||||
Account Move Template - Templates for Journal Entries
|
Account Move Template - Templates for Journal Entries
|
||||||
=====================================================
|
=====================================================
|
||||||
|
|
||||||
@ -22,10 +27,15 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
|
|
||||||
|
|
||||||
Credits
|
Credits
|
||||||
-------
|
=======
|
||||||
|
|
||||||
|
Images
|
||||||
|
------
|
||||||
|
|
||||||
|
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
~~~~~~~~
|
--------
|
||||||
|
|
||||||
* Davide Corio <davide.corio@agilebg.com>
|
* Davide Corio <davide.corio@agilebg.com>
|
||||||
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
|
||||||
@ -33,8 +43,24 @@ Authors:
|
|||||||
* Franco Tampieri <franco.tampieri@agilebg.com>
|
* Franco Tampieri <franco.tampieri@agilebg.com>
|
||||||
|
|
||||||
Contributors:
|
Contributors:
|
||||||
~~~~~~~~~~~~~
|
-------------
|
||||||
|
|
||||||
* Jalal ZAHID <j.zahid@auriumtechnologies.com> (port to v10)
|
* Jalal ZAHID <j.zahid@auriumtechnologies.com> (port to v10)
|
||||||
* Alex Comba <alex.comba@agilebg.com> (Port to V8)
|
* Alex Comba <alex.comba@agilebg.com> (Port to V8)
|
||||||
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
|
||||||
|
* Raf Ven <raf.ven@dynapps.be> (port to v11)
|
||||||
|
|
||||||
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
To contribute to this module, please visit https://odoo-community.org.
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015-2017 See manifest
|
# Copyright 2015-2017 See manifest
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015-2017 See manifest
|
# Copyright 2015-2017 See manifest
|
||||||
|
# Copyright 2018 Raf Ven <raf.ven@dynapps.be>
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': "Account Move Template",
|
'name': "Account Move Template",
|
||||||
'version': '10.0.2.0.0',
|
'version': '11.0.1.0.0',
|
||||||
'category': 'Generic Modules/Accounting',
|
'category': 'Generic Modules/Accounting',
|
||||||
'summary': "Templates for recurring Journal Entries",
|
'summary': "Templates for recurring Journal Entries",
|
||||||
'author': "Agile Business Group,Odoo Community Association (OCA), Aurium "
|
'author': "Agile Business Group,Odoo Community Association (OCA), Aurium "
|
||||||
"Technologies,Vauxoo",
|
"Technologies,Vauxoo",
|
||||||
'website': 'https://github.com/OCA/account-financial-tools',
|
'website': 'https://github.com/OCA/account-financial-tools',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'depends': ['account_accountant', 'analytic'],
|
'depends': [
|
||||||
|
'account',
|
||||||
|
'analytic',
|
||||||
|
],
|
||||||
'data': [
|
'data': [
|
||||||
'security/ir.model.access.csv',
|
'security/ir.model.access.csv',
|
||||||
'view/move_template.xml',
|
'view/move_template.xml',
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015-2017 See manifest
|
# Copyright 2015-2017 See manifest
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015-2017 See manifest
|
# Copyright 2015-2017 See manifest
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
from odoo import models, fields, api, exceptions, _
|
|
||||||
from odoo.tools.safe_eval import safe_eval
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import re
|
import re
|
||||||
|
from odoo import models, fields, api, exceptions, _
|
||||||
|
from odoo.tools.safe_eval import safe_eval
|
||||||
|
|
||||||
|
|
||||||
class AccountDocumentTemplate(models.Model):
|
class AccountDocumentTemplate(models.Model):
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015-2017 See manifest
|
# Copyright 2015-2017 See manifest
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<field name="name">account.move.template.line.tree</field>
|
<field name="name">account.move.template.line.tree</field>
|
||||||
<field name="model">account.move.template.line</field>
|
<field name="model">account.move.template.line</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Journal Entry Template Line">
|
<tree>
|
||||||
<field name="sequence"/>
|
<field name="sequence"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="journal_id"/>
|
<field name="journal_id"/>
|
||||||
@ -83,7 +83,7 @@
|
|||||||
<field name="name">account.move.template.tree</field>
|
<field name="name">account.move.template.tree</field>
|
||||||
<field name="model">account.move.template</field>
|
<field name="model">account.move.template</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Journal Entry Template">
|
<tree>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="company_id" groups="base.group_multi_company"/>
|
<field name="company_id" groups="base.group_multi_company"/>
|
||||||
</tree>
|
</tree>
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>)
|
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>)
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2015-2017 See manifest
|
# Copyright 2015-2017 See manifest
|
||||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
from odoo import models, fields, api
|
|
||||||
import time
|
import time
|
||||||
|
from odoo import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
class WizardSelectMoveTemplate(models.TransientModel):
|
class WizardSelectMoveTemplate(models.TransientModel):
|
||||||
@ -14,7 +13,7 @@ class WizardSelectMoveTemplate(models.TransientModel):
|
|||||||
line_ids = fields.One2many(
|
line_ids = fields.One2many(
|
||||||
'wizard.select.move.template.line', 'template_id')
|
'wizard.select.move.template.line', 'template_id')
|
||||||
state = fields.Selection(
|
state = fields.Selection(
|
||||||
[('template_selected', 'Template selected')], 'State')
|
[('template_selected', 'Template selected')])
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def load_lines(self):
|
def load_lines(self):
|
||||||
@ -59,7 +58,7 @@ class WizardSelectMoveTemplate(models.TransientModel):
|
|||||||
move = self._create_move(name, journal.id, partner)
|
move = self._create_move(name, journal.id, partner)
|
||||||
moves = moves + move
|
moves = moves + move
|
||||||
for line in self.template_id.template_line_ids.filtered(
|
for line in self.template_id.template_line_ids.filtered(
|
||||||
lambda j: j.journal_id == journal):
|
lambda l, j=journal: l.journal_id == j):
|
||||||
lines.append((0, 0,
|
lines.append((0, 0,
|
||||||
self._prepare_line(line, amounts, partner)))
|
self._prepare_line(line, amounts, partner)))
|
||||||
move.write({'line_ids': lines})
|
move.write({'line_ids': lines})
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
<field name="name">Select Move Template Line</field>
|
<field name="name">Select Move Template Line</field>
|
||||||
<field name="model">wizard.select.move.template.line</field>
|
<field name="model">wizard.select.move.template.line</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Move Template Line" editable="bottom">
|
<tree editable="bottom">
|
||||||
<field name="sequence" invisible="1"/>
|
<field name="sequence" invisible="1"/>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="account_id" />
|
<field name="account_id" />
|
||||||
|
Loading…
Reference in New Issue
Block a user