mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
OCA reviews
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
:alt: License: AGPL-3
|
||||
|
||||
=================
|
||||
product_quick_bom
|
||||
Product Quick Bom
|
||||
=================
|
||||
|
||||
This module was written to create quickly the bom for your product.
|
||||
@@ -15,12 +15,12 @@ Usage
|
||||
|
||||
To use this module, you need to:
|
||||
|
||||
* go to a product form, click on edit, add a line in the bom tab and see that a bom
|
||||
linked to the product have been created
|
||||
* Go to a product form, click on edit, add a line in the bom tab and see that a bom
|
||||
linked to the product have been created.
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/manufacture/10.0
|
||||
:target: https://runbot.odoo-community.org/runbot/129/10.0
|
||||
|
||||
.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt
|
||||
.. branch is "8.0" for example
|
||||
@@ -36,8 +36,6 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
|
||||
`here <https://github.com/OCA/manufacture/issues/new?body=module:%20product_quick_bom%0Aversion:%2010.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import product
|
||||
from . import bom
|
||||
from . import models
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"mrp",
|
||||
],
|
||||
"data": [
|
||||
"product_view.xml",
|
||||
"views/product_view.xml",
|
||||
],
|
||||
|
||||
}
|
||||
|
||||
6
product_quick_bom/models/__init__.py
Normal file
6
product_quick_bom/models/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import product
|
||||
from . import bom
|
||||
@@ -54,7 +54,6 @@ class ProductTemplate(models.Model):
|
||||
ctx = self._context.copy()
|
||||
ctx.pop('default_type', None)
|
||||
self.with_context(ctx)._process_bom_vals(bom_vals)
|
||||
|
||||
return res
|
||||
|
||||
@api.multi
|
||||
@@ -1,5 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import test_quick_bom
|
||||
from . import test_quick_bom
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openerp.tests.common import TransactionCase
|
||||
from odoo.tests.common import TransactionCase
|
||||
import logging
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -25,18 +25,14 @@ class TestQuickBom(TransactionCase):
|
||||
(0, 0, {'product_id': self.cpu.id, 'product_qty': 1, })]})
|
||||
bom = self.computer.bom_ids
|
||||
self.assertEqual(self.computer.id, bom.product_tmpl_id.id)
|
||||
self.assertEqual(bom.bom_line_ids[0].product_id.id,
|
||||
self.ram.id)
|
||||
self.assertEqual(bom.bom_line_ids[0].product_id.id, self.ram.id)
|
||||
self.assertEqual(bom.bom_line_ids[0].product_qty, 2)
|
||||
self.assertEqual(bom.bom_line_ids[1].product_id.id,
|
||||
self.hard_drive.id)
|
||||
self.assertEqual(bom.bom_line_ids[1].product_id.id, self.hard_drive.id)
|
||||
self.assertEqual(bom.bom_line_ids[1].product_qty, 2)
|
||||
self.assertEqual(bom.bom_line_ids[2].product_id.id,
|
||||
self.cpu.id)
|
||||
self.assertEqual(bom.bom_line_ids[2].product_id.id, self.cpu.id)
|
||||
self.assertEqual(bom.bom_line_ids[2].product_qty, 1)
|
||||
|
||||
def test_read_bom(self):
|
||||
|
||||
bom = self.env['mrp.bom'].create({
|
||||
'type': 'normal',
|
||||
'product_tmpl_id': self.computer.id})
|
||||
|
||||
Reference in New Issue
Block a user