2
0

account_move_template: Migration to 11.0

This commit is contained in:
Raf Ven 2018-03-05 20:31:53 +01:00 committed by Abraham Anes
parent 48603ddf7f
commit 1fd226a7ea
10 changed files with 213 additions and 190 deletions

View File

@ -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
=====================================================
@ -22,10 +27,15 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
Credits
-------
=======
Images
------
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
Authors:
~~~~~~~~
--------
* Davide Corio <davide.corio@agilebg.com>
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
@ -33,8 +43,24 @@ Authors:
* Franco Tampieri <franco.tampieri@agilebg.com>
Contributors:
~~~~~~~~~~~~~
-------------
* Jalal ZAHID <j.zahid@auriumtechnologies.com> (port to v10)
* Alex Comba <alex.comba@agilebg.com> (Port to V8)
* 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.

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2017 See manifest
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

View File

@ -1,17 +1,20 @@
# -*- coding: utf-8 -*-
# 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
{
'name': "Account Move Template",
'version': '10.0.2.0.0',
'version': '11.0.1.0.0',
'category': 'Generic Modules/Accounting',
'summary': "Templates for recurring Journal Entries",
'author': "Agile Business Group,Odoo Community Association (OCA), Aurium "
"Technologies,Vauxoo",
'website': 'https://github.com/OCA/account-financial-tools',
'license': 'AGPL-3',
'depends': ['account_accountant', 'analytic'],
'depends': [
'account',
'analytic',
],
'data': [
'security/ir.model.access.csv',
'view/move_template.xml',

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2017 See manifest
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

View File

@ -1,11 +1,10 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2017 See manifest
# 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
import re
from odoo import models, fields, api, exceptions, _
from odoo.tools.safe_eval import safe_eval
class AccountDocumentTemplate(models.Model):

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2017 See manifest
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

View File

@ -4,7 +4,7 @@
<field name="name">account.move.template.line.tree</field>
<field name="model">account.move.template.line</field>
<field name="arch" type="xml">
<tree string="Journal Entry Template Line">
<tree>
<field name="sequence"/>
<field name="name"/>
<field name="journal_id"/>
@ -83,7 +83,7 @@
<field name="name">account.move.template.tree</field>
<field name="model">account.move.template</field>
<field name="arch" type="xml">
<tree string="Journal Entry Template">
<tree>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>)

View File

@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2017 See manifest
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import models, fields, api
import time
from odoo import models, fields, api
class WizardSelectMoveTemplate(models.TransientModel):
@ -14,7 +13,7 @@ class WizardSelectMoveTemplate(models.TransientModel):
line_ids = fields.One2many(
'wizard.select.move.template.line', 'template_id')
state = fields.Selection(
[('template_selected', 'Template selected')], 'State')
[('template_selected', 'Template selected')])
@api.multi
def load_lines(self):
@ -59,7 +58,7 @@ class WizardSelectMoveTemplate(models.TransientModel):
move = self._create_move(name, journal.id, partner)
moves = moves + move
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,
self._prepare_line(line, amounts, partner)))
move.write({'line_ids': lines})

View File

@ -48,7 +48,7 @@
<field name="name">Select Move Template Line</field>
<field name="model">wizard.select.move.template.line</field>
<field name="arch" type="xml">
<tree string="Move Template Line" editable="bottom">
<tree editable="bottom">
<field name="sequence" invisible="1"/>
<field name="name" />
<field name="account_id" />