[MIG] account_move_line_stock_info: Migration to 11.0

This commit is contained in:
mreficent
2018-08-30 19:10:04 +02:00
committed by Joan Mateu Jordi
parent 638b56d76e
commit 48cf3145b1
13 changed files with 34 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg .. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3 :alt: License: AGPL-3
============================ ============================
@@ -12,31 +12,36 @@ Usage
===== =====
* The stock manager can check the journal items by accessing to 'Inventory > * The stock manager can check the journal items by accessing to 'Inventory >
Reports > Stock moves'. Reports > Stock moves'.
* A user belonging to the group 'Accounting & Finance/Adviser' can review the * A user belonging to the group 'Accounting & Finance/Adviser' can review the
details of a move that is associated to a journal item through details of a move that is associated to a journal item through
'Invoicing > Adviser > Journal Entries (or Journal items)'. 'Invoicing > Adviser > Journal Entries (or Journal items)'.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot :alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/153/10.0 :target: https://runbot.odoo-community.org/runbot/153/11.0
Bug Tracker Bug Tracker
=========== ===========
Bugs are tracked on `GitHub Issues Bugs are tracked on `GitHub Issues
<https://github.com/OCA/stock-logistics-warehouse/issues>`_. In case of <https://github.com/OCA/stock-logistics-warehouse/issues>`_. In case of trouble, please
trouble, please check there if your issue has already been reported. If you check there if your issue has already been reported. If you spotted it first,
spotted it first, help us smashing it by providing a detailed and welcomed help us smash it by providing detailed and welcomed feedback.
feedback.
Credits Credits
======= =======
Images
------
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
Contributors Contributors
------------ ------------
* Jordi Ballester Alomar <jordi.ballester@eficent.com> * Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Lois Rilo <lois.rilo@eficent.com> * Lois Rilo <lois.rilo@eficent.com>

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models from . import models

View File

@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
# © 2016 Eficent Business and IT Consulting Services S.L. # © 2016 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{ {
"name": "Account Move Line Stock Move", "name": "Account Move Line Stock Move",
"version": "10.0.1.0.0", "version": "11.0.1.0.0",
"depends": [ "depends": [
"stock_account" "stock_account"
], ],

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import account_move_line from . import account_move_line

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Eficent Business and IT Consulting Services S.L. # © 2016 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Eficent Business and IT Consulting Services S.L. # © 2016 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

View File

@@ -0,0 +1,2 @@
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Lois Rilo <lois.rilo@eficent.com>

View File

@@ -0,0 +1 @@
This module adds the stock move to the account move lines that it generates.

View File

@@ -0,0 +1,6 @@
* The stock manager can check the journal items by accessing to 'Inventory >
Reports > Stock moves'.
* A user belonging to the group 'Accounting & Finance/Adviser' can review the
details of a move that is associated to a journal item through
'Invoicing > Adviser > Journal Entries (or Journal items)'.

View File

@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_account_move_line_stock_move from . import test_account_move_line_stock_move

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com) # © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
@@ -78,14 +77,14 @@ class TestAccountMoveLineStockInfo(TransactionCase):
'email': 'test@yourcompany.com', 'email': 'test@yourcompany.com',
'company_id': company.id, 'company_id': company.id,
'company_ids': [(4, company.id)], 'company_ids': [(4, company.id)],
'groups_id': [(6, 0, group_ids)] 'groups_id': [(6, 0, group_ids)],
}) })
return user.id return user.id
def _create_account_type(self, name, type): def _create_account_type(self, name, a_type):
acc_type = self.acc_type_model.create({ acc_type = self.acc_type_model.create({
'name': name, 'name': name,
'type': type 'type': a_type,
}) })
return acc_type return acc_type
@@ -94,9 +93,8 @@ class TestAccountMoveLineStockInfo(TransactionCase):
account = self.account_model.create({ account = self.account_model.create({
'name': name, 'name': name,
'code': code, 'code': code,
'type': 'other',
'user_type_id': acc_type.id, 'user_type_id': acc_type.id,
'company_id': company.id 'company_id': company.id,
}) })
return account return account
@@ -133,7 +131,7 @@ class TestAccountMoveLineStockInfo(TransactionCase):
'product_uom_qty': 3, 'product_uom_qty': 3,
'location_id': location.id, 'location_id': location.id,
'location_dest_id': location_dest.id, 'location_dest_id': location_dest.id,
'price_unit': 10 'price_unit': 10,
})] })]
}) })
return picking return picking
@@ -145,6 +143,7 @@ class TestAccountMoveLineStockInfo(TransactionCase):
picking_in = self._create_picking( picking_in = self._create_picking(
self.picking_type_in, self.location_supplier, self.location_stock) self.picking_type_in, self.location_supplier, self.location_stock)
picking_in.action_confirm() picking_in.action_confirm()
picking_in.move_lines.quantity_done = 1
picking_in.action_done() picking_in.action_done()
account_move_line = False account_move_line = False
@@ -157,6 +156,7 @@ class TestAccountMoveLineStockInfo(TransactionCase):
picking_out = self._create_picking( picking_out = self._create_picking(
self.picking_type_out, self.location_supplier, self.location_stock) self.picking_type_out, self.location_supplier, self.location_stock)
picking_out.action_confirm() picking_out.action_confirm()
picking_out.move_lines.quantity_done = 1
picking_out.action_done() picking_out.action_done()
for move in picking_out.move_lines: for move in picking_out.move_lines:

View File

@@ -12,15 +12,4 @@
</field> </field>
</record> </record>
<record id="view_move_line_form2" model="ir.ui.view">
<field name="name">account.move.line.form2</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_move_line_form2"/>
<field name="arch" type="xml">
<field name="quantity" position="before">
<field name="stock_move_id"/>
</field>
</field>
</record>
</odoo> </odoo>

View File

@@ -6,7 +6,7 @@
<field name="model">stock.move</field> <field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_move_form"/> <field name="inherit_id" ref="stock.view_move_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<group name="moved_quants_grp" position="after"> <group name="linked_group" position="after">
<group name="account_move_lines_grp" <group name="account_move_lines_grp"
string="Journal Items" colspan="4"> string="Journal Items" colspan="4">
<field name="account_move_line_ids" readonly="1" <field name="account_move_line_ids" readonly="1"
@@ -22,7 +22,7 @@
<field name="model">stock.move</field> <field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_move_picking_form"/> <field name="inherit_id" ref="stock.view_move_picking_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<group name="moved_quants_grp" position="after"> <group name="quants_grp" position="after">
<group name="account_move_lines_grp" <group name="account_move_lines_grp"
string="Journal Items" colspan="4"> string="Journal Items" colspan="4">
<field name="account_move_line_ids" readonly="1" <field name="account_move_line_ids" readonly="1"