Skip to content

Commit

Permalink
pr reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
EBII committed Mar 7, 2017
1 parent 9c85319 commit 8379ec6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 55 deletions.
6 changes: 3 additions & 3 deletions product_quick_bom/README.rst
Expand Up @@ -20,7 +20,7 @@ To use this module, you need to:

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/{repo_id}/{branch}
:target: https://runbot.odoo-community.org/runbot/manufacture/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
Expand All @@ -33,10 +33,10 @@ For further information, please visit:
Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/{project_repo}/issues>`_.
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/{project_repo}/issues/new?body=module:%20{module_name}%0Aversion:%20{version}%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`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
Expand Down
7 changes: 4 additions & 3 deletions product_quick_bom/bom.py
Expand Up @@ -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 odoo import models, fields
from odoo import fields, models, _


class MrpBom(models.Model):
Expand All @@ -11,14 +11,15 @@ class MrpBom(models.Model):
_sql_constraint = (
'uniq_product_template',
'uniq(product_tmpl_id)',
'You can only have one Bom per product template',
_('You can only have one Bom per product template'),
)


class MrpBomLine(models.Model):
_inherit = 'mrp.bom.line'

product_tmpl_id = fields.Many2one(
'product.template',
comodel_name='product.template',
related='bom_id.product_tmpl_id',
readonly=True,
store=True)
42 changes: 0 additions & 42 deletions product_quick_bom/i18n/product_quick_bom.pot

This file was deleted.

7 changes: 4 additions & 3 deletions product_quick_bom/product.py
Expand Up @@ -2,15 +2,15 @@
# Copyright (C) 2015 Akretion (http://www.akretion.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import models, fields, api
from odoo import api, fields, models


class ProductTemplate(models.Model):
_inherit = 'product.template'

bom_line_ids = fields.One2many(
'mrp.bom.line',
'product_tmpl_id',
comodel_name='mrp.bom.line',
inverse_name='product_tmpl_id',
string='Bom Line',
help='If you product is manufactured you can select'
'here the componant to product them')
Expand All @@ -21,6 +21,7 @@ def _extract_bom_line(self, vals):

@api.multi
def _prepare_bom_vals(self, vals):
self.ensure_one()
return {
'product_tmpl_id': self.id,
'bom_line_ids': vals,
Expand Down
4 changes: 0 additions & 4 deletions product_quick_bom/product_view.xml
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>

<record id="product_template_form_view" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
Expand All @@ -19,6 +17,4 @@
</xpath>
</field>
</record>

</data>
</odoo>

0 comments on commit 8379ec6

Please sign in to comment.