-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e0a5b37
commit ee91065
Showing
54 changed files
with
2,342 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
======= | ||
MRP Bom | ||
======= | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:7756eaa4367516c358c1d0b6e504cff3969d357478ad37265a973d03c50fccac | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Mature | ||
.. |badge2| image:: https://img.shields.io/badge/licence-OPL--1-blue.png | ||
:target: https://www.odoo.com/documentation/master/legal/licenses.html | ||
:alt: License: OPL-1 | ||
.. |badge3| image:: https://img.shields.io/badge/github-dhongu%2Fdeltatech-lightgray.png?logo=github | ||
:target: https://github.com/dhongu/deltatech/tree/17.0/deltatech_mrp_bom | ||
:alt: dhongu/deltatech | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
|
||
Features: | ||
- adugare buton pentru accesare rapida sub-LDM | ||
|
||
- adds button for quick access of sub-LDM | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/dhongu/deltatech/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/dhongu/deltatech/issues/new?body=module:%20deltatech_mrp_bom%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Terrabit | ||
* Dorin Hongu | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
.. |maintainer-dhongu| image:: https://github.com/dhongu.png?size=40px | ||
:target: https://github.com/dhongu | ||
:alt: dhongu | ||
|
||
Current maintainer: | ||
|
||
|maintainer-dhongu| | ||
|
||
This module is part of the `dhongu/deltatech <https://github.com/dhongu/deltatech/tree/17.0/deltatech_mrp_bom>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# © 2008-2021 Deltatech | ||
# See README.rst file on addons root folder for license details | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# © 2008-2021 Deltatech | ||
# See README.rst file on addons root folder for license details | ||
|
||
{ | ||
"name": "MRP Bom", | ||
"summary": "MRP Bom", | ||
"version": "17.0.1.0.2", | ||
"author": "Terrabit, Dorin Hongu", | ||
"license": "OPL-1", | ||
"website": "https://www.terrabit.ro", | ||
"category": "Manufacturing", | ||
"depends": ["mrp"], | ||
"data": ["views/mrp_bom_view.xml"], | ||
"qweb": [], | ||
"images": ["static/description/main_screenshot.png"], | ||
"development_status": "Mature", | ||
"maintainers": ["dhongu"], | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# © 2008-2021 Deltatech | ||
# See README.rst file on addons root folder for license details | ||
|
||
from . import mrp_bom |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# © 2008-2021 Deltatech | ||
# Dorin Hongu <dhongu(@)gmail(.)com | ||
# See README.rst file on addons root folder for license details | ||
|
||
|
||
from odoo import _, api, fields, models | ||
|
||
|
||
class MrpBom(models.Model): | ||
_inherit = "mrp.bom" | ||
|
||
@api.onchange("product_tmpl_id") | ||
def onchange_product_tmpl_id(self): | ||
if self.product_tmpl_id: | ||
self.product_uom_id = self.product_tmpl_id.uom_id.id | ||
if self.product_id.product_tmpl_id != self.product_tmpl_id: | ||
self.product_id = False | ||
|
||
for line in self.bom_line_ids: | ||
bom_product_template_attribute_value_ids = self.env["product.template.attribute.value"] | ||
|
||
for attribute_value in line.bom_product_template_attribute_value_ids: | ||
for possible_value in line.possible_bom_product_template_attribute_value_ids: | ||
if attribute_value.name == possible_value.name: | ||
bom_product_template_attribute_value_ids |= possible_value | ||
|
||
line.bom_product_template_attribute_value_ids = bom_product_template_attribute_value_ids | ||
|
||
|
||
class MrpBomLine(models.Model): | ||
_inherit = "mrp.bom.line" | ||
# _rec_name = "name" | ||
|
||
bom_product_template_attribute_value_ids = fields.Many2many("product.template.attribute.value", copy=True) | ||
|
||
# name = fields.Char(string="Name") | ||
# | ||
# @api.onchange("product_id") | ||
# def onchange_product_id(self): | ||
# super(MrpBomLine, self).onchange_product_id() | ||
# if self.product_id: | ||
# self.name = self.product_id.name | ||
# | ||
# @api.model | ||
# def create(self, vals): | ||
# if "name" not in vals: | ||
# product = self.env["product.product"].browse(vals["product_id"]) | ||
# vals["name"] = product.name | ||
# return super(MrpBomLine, self).create(vals) | ||
|
||
def open_bom(self): | ||
self.ensure_one() | ||
if self.child_bom_id: | ||
# print "Deschid sublista de materiale" | ||
return { | ||
"res_id": self.child_bom_id.id, | ||
"domain": "[('id','=', " + str(self.child_bom_id.id) + ")]", | ||
"name": _("BOM"), | ||
"view_mode": "form,tree", | ||
"res_model": "mrp.bom", | ||
"view_id": False, | ||
"target": "current", | ||
"nodestroy": True, | ||
"type": "ir.actions.act_window", | ||
} | ||
|
||
# | ||
# def init(self): | ||
# super(MrpBomLine, self).init() | ||
# lines = self.search([("name", "=", False)]) | ||
# for line in lines: | ||
# line.write({"name": line.product_id.name}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
Features: | ||
- adugare buton pentru accesare rapida sub-LDM | ||
|
||
- adds button for quick access of sub-LDM |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.