mirror of
https://github.com/bringout/oca-mrp.git
synced 2026-04-25 14:52:07 +02:00
Initial commit: OCA Mrp packages (117 packages)
This commit is contained in:
commit
277e84fd7a
4403 changed files with 395154 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import qc_test_wizard
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
# Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
# Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
# Copyright 2017 ForgeFlow S.L.
|
||||
# Copyright 2017 Simone Rubino - Agile Business Group
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class QcInspectionSetTest(models.TransientModel):
|
||||
"""This wizard is used to preset the test for a given
|
||||
inspection. This will not only fill in the 'test' field, but will
|
||||
also fill in all lines of the inspection with the corresponding lines of
|
||||
the template.
|
||||
"""
|
||||
|
||||
_name = "qc.inspection.set.test"
|
||||
_description = "Set test for inspection"
|
||||
|
||||
test = fields.Many2one(comodel_name="qc.test")
|
||||
|
||||
def action_create_test(self):
|
||||
inspection = self.env["qc.inspection"].browse(self.env.context["active_id"])
|
||||
inspection.test = self.test
|
||||
inspection.inspection_lines.unlink()
|
||||
inspection.inspection_lines = inspection._prepare_inspection_lines(self.test)
|
||||
return True
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- Copyright 2010 NaN Projectes de Programari Lliure, S.L.
|
||||
Copyright 2014 Serv. Tec. Avanzados - Pedro M. Baeza
|
||||
Copyright 2014 Oihane Crucelaegui - AvanzOSC
|
||||
Copyright 2017 ForgeFlow S.L.
|
||||
Copyright 2017 Simone Rubino - Agile Business Group
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_qc_test_set_test_form" model="ir.ui.view">
|
||||
<field name="name">qc.inspection.set.test.form</field>
|
||||
<field name="model">qc.inspection.set.test</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select test" version="7.0">
|
||||
<group>
|
||||
<field name="test" />
|
||||
</group>
|
||||
<footer>
|
||||
<button
|
||||
name="action_create_test"
|
||||
string="Accept"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
or
|
||||
<button special="cancel" class="oe_link" string="Cancel" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_qc_inspection_set_test" model="ir.actions.act_window">
|
||||
<field name="name">Select test</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">qc.inspection.set.test</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue