migrates to v9

This commit is contained in:
lreficent
2016-12-20 12:14:27 +01:00
committed by ps-tubtim
parent 84f3c873e1
commit b4e75a327c
5 changed files with 21 additions and 19 deletions

View File

@@ -12,12 +12,12 @@ This module adds the stock move to the account move lines that it generates.
Usage
=====
* The stock manager can check the journal items generated by a stock
move, by accessing to the picking, then clicking on one of the moves, to
display the list of journal items.
* The stock manager can check the journal items by accessing to 'Inventory >
Reports > Stock moves'.
* An accounting user or manager can review the details of a move that is
associated to a journal item that she/he is checking.
* 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)'.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot

View File

@@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Account Move Line Stock Move",
"version": "8.0.1.0.0",
"version": "9.0.1.0.0",
"depends": [
"stock_account"
],

View File

@@ -32,20 +32,20 @@ class TestAccountMoveLineStockInfo(common.TransactionCase):
'account.group_account_manager')
# Create account for Goods Received Not Invoiced
acc_type = 'equity'
acc_type = self._create_account_type('equity', 'other')
name = 'Goods Received Not Invoiced'
code = 'grni'
self.account_grni = self._create_account(acc_type, name, code,
self.company)
# Create account for Cost of Goods Sold
acc_type = 'expense'
acc_type = self._create_account_type('expense', 'other')
name = 'Cost of Goods Sold'
code = 'cogs'
self.account_cogs = self._create_account(acc_type, name, code,
self.company)
# Create account for Inventory
acc_type = 'asset'
acc_type = self._create_account_type('asset', 'other')
name = 'Inventory'
code = 'inventory'
self.account_inventory = self._create_account(acc_type, name, code,
@@ -82,14 +82,20 @@ class TestAccountMoveLineStockInfo(common.TransactionCase):
})
return user.id
def _create_account_type(self, name, type):
acc_type = self.acc_type_model.create({
'name': name,
'type': type
})
return acc_type
def _create_account(self, acc_type, name, code, company):
"""Create an account."""
types = self.acc_type_model.search([('code', '=', acc_type)])
account = self.account_model.create({
'name': name,
'code': code,
'type': 'other',
'user_type': types and types[0].id,
'user_type_id': acc_type.id,
'company_id': company.id
})
return account

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account.move.line.form</field>
@@ -24,5 +23,4 @@
</field>
</record>
</data>
</openerp>
</odoo>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<record id="view_move_form" model="ir.ui.view">
<field name="name">stock.move.form</field>
@@ -33,5 +32,4 @@
</field>
</record>
</data>
</openerp>
</odoo>