[11.0][MIG] account_move_line_purchase_info
This commit is contained in:
parent
342d10d336
commit
315cddebf1
@ -25,7 +25,7 @@ The purchase order line will be automatically copied to the 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/92/9.0
|
:target: https://runbot.odoo-community.org/runbot/92/11.0
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# © 2017 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).
|
||||||
|
|
||||||
from . import models
|
from . import models
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
# © 2017 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
# (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).
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Account Move Line Purchase Info",
|
"name": "Account Move Line Purchase Info",
|
||||||
"summary": "Introduces the purchase order line to the journal items",
|
"summary": "Introduces the purchase order line to the journal items",
|
||||||
"version": "10.0.1.0.0",
|
"version": "11.0.1.0.0",
|
||||||
"author": "Eficent, "
|
"author": "Eficent, "
|
||||||
"Odoo Community Association (OCA)",
|
"Odoo Community Association (OCA)",
|
||||||
"website": "http://www.github.com/OCA/account-financial-tools",
|
"website": "http://www.github.com/OCA/account-financial-tools",
|
||||||
"category": "Generic",
|
"category": "Generic",
|
||||||
"depends": ["account_accountant", "purchase"],
|
"depends": ["account", "purchase"],
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"data": [
|
"data": [
|
||||||
"security/account_security.xml",
|
"security/account_security.xml",
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# © 2017 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).
|
||||||
|
|
||||||
from . import account_move
|
from . import account_move
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
# © 2017 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
# (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).
|
||||||
|
|
||||||
from odoo import api, models
|
from odoo import api, models
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
# © 2017 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
# (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).
|
||||||
|
|
||||||
from odoo import fields, models
|
from odoo import fields, models
|
||||||
@ -9,6 +9,8 @@ class AccountMoveLine(models.Model):
|
|||||||
|
|
||||||
_inherit = 'account.move.line'
|
_inherit = 'account.move.line'
|
||||||
|
|
||||||
purchase_line_id = fields.Many2one('purchase.order.line',
|
purchase_line_id = fields.Many2one(
|
||||||
'Purchase Order Line',
|
comodel_name='purchase.order.line',
|
||||||
ondelete='set null', index=True)
|
string='Purchase Order Line',
|
||||||
|
ondelete='set null', index=True,
|
||||||
|
)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
# © 2017 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
# (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).
|
||||||
|
|
||||||
from odoo import api, models
|
from odoo import api, models
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<record id="group_account_move_purchase_info" model="res.groups">
|
<record id="group_account_move_purchase_info" model="res.groups">
|
||||||
<field name="name">Purchase info in Journal Items</field>
|
<field name="name">Purchase info in Journal Items</field>
|
||||||
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
|
<field name="category_id" ref="base.module_category_hidden"/>
|
||||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# © 2017 Eficent - Jordi Ballester Alomar
|
|
||||||
# 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).
|
||||||
|
|
||||||
from . import test_account_move_line_purchase_info
|
from . import test_account_move_line_purchase_info
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
|
||||||
# © 2017 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
# (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).
|
||||||
|
|
||||||
from odoo.tests import common
|
from odoo.tests import common
|
||||||
@ -178,8 +178,8 @@ class TestAccountMoveLinePurchaseInfo(common.TransactionCase):
|
|||||||
purchase.button_confirm()
|
purchase.button_confirm()
|
||||||
picking = purchase.picking_ids[0]
|
picking = purchase.picking_ids[0]
|
||||||
picking.force_assign()
|
picking.force_assign()
|
||||||
picking.pack_operation_product_ids.write({'qty_done': 1.0})
|
picking.move_lines.write({'quantity_done': 1.0})
|
||||||
picking.do_new_transfer()
|
picking.button_validate()
|
||||||
|
|
||||||
expected_balance = 1.0
|
expected_balance = 1.0
|
||||||
self._check_account_balance(self.account_inventory.id,
|
self._check_account_balance(self.account_inventory.id,
|
||||||
@ -192,7 +192,7 @@ class TestAccountMoveLinePurchaseInfo(common.TransactionCase):
|
|||||||
'account_id': purchase.partner_id.property_account_payable_id.id,
|
'account_id': purchase.partner_id.property_account_payable_id.id,
|
||||||
})
|
})
|
||||||
invoice.purchase_order_change()
|
invoice.purchase_order_change()
|
||||||
invoice.signal_workflow('invoice_open')
|
invoice.action_invoice_open()
|
||||||
|
|
||||||
for aml in invoice.move_id.line_ids:
|
for aml in invoice.move_id.line_ids:
|
||||||
if aml.product_id == po_line.product_id and aml.invoice_id:
|
if aml.product_id == po_line.product_id and aml.invoice_id:
|
||||||
|
@ -13,18 +13,6 @@
|
|||||||
</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="purchase_line_id"
|
|
||||||
groups="account_move_line_purchase_info.group_account_move_purchase_info"/>
|
|
||||||
</field>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record id="view_move_line_tree" model="ir.ui.view">
|
<record id="view_move_line_tree" model="ir.ui.view">
|
||||||
<field name="name">account.move.line.tree</field>
|
<field name="name">account.move.line.tree</field>
|
||||||
<field name="model">account.move.line</field>
|
<field name="model">account.move.line</field>
|
||||||
|
Loading…
Reference in New Issue
Block a user