mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[14.0][MIG]agreement_mrp: Travis
This commit is contained in:
committed by
Murtaza Mithaiwala
parent
749f80c5b2
commit
fda02894fa
@@ -2,26 +2,25 @@
|
|||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Agreement - MRP',
|
"name": "Agreement - MRP",
|
||||||
'summary': 'Link manufacturing orders to an agreement',
|
"summary": "Link manufacturing orders to an agreement",
|
||||||
'version': '12.0.1.0.1',
|
"version": "14.0.1.0.0",
|
||||||
'category': 'Contract',
|
"category": "Contract",
|
||||||
'author': 'Open Source Integrators, '
|
"author": "Open Source Integrators, " "Odoo Community Association (OCA)",
|
||||||
'Odoo Community Association (OCA)',
|
"website": "https://github.com/OCA/contract",
|
||||||
'website': 'https://github.com/OCA/contract',
|
"depends": [
|
||||||
'depends': [
|
"agreement_serviceprofile",
|
||||||
'agreement_serviceprofile',
|
"mrp",
|
||||||
'mrp',
|
|
||||||
],
|
],
|
||||||
'data': [
|
"data": [
|
||||||
'views/agreement_view.xml',
|
"views/agreement_view.xml",
|
||||||
'views/mrp_view.xml',
|
"views/mrp_view.xml",
|
||||||
],
|
],
|
||||||
'installable': True,
|
"installable": True,
|
||||||
'license': 'AGPL-3',
|
"license": "AGPL-3",
|
||||||
'development_status': 'Beta',
|
"development_status": "Beta",
|
||||||
'maintainers': [
|
"maintainers": [
|
||||||
'smangukiya',
|
"smangukiya",
|
||||||
'max3903',
|
"max3903",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,11 @@ from odoo import api, fields, models
|
|||||||
class Agreement(models.Model):
|
class Agreement(models.Model):
|
||||||
_inherit = "agreement"
|
_inherit = "agreement"
|
||||||
|
|
||||||
mo_count = fields.Integer('# MOs', compute='_compute_mo_count')
|
mo_count = fields.Integer("# MOs", compute="_compute_mo_count")
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def _compute_mo_count(self):
|
def _compute_mo_count(self):
|
||||||
for ag_rec in self:
|
for ag_rec in self:
|
||||||
ag_rec.mo_count = self.env['mrp.production'].search_count(
|
ag_rec.mo_count = self.env["mrp.production"].search_count(
|
||||||
[('agreement_id', 'in', ag_rec.ids)])
|
[("agreement_id", "in", ag_rec.ids)]
|
||||||
|
)
|
||||||
|
|||||||
@@ -7,6 +7,5 @@ from odoo import fields, models
|
|||||||
class MRPProduction(models.Model):
|
class MRPProduction(models.Model):
|
||||||
_inherit = "mrp.production"
|
_inherit = "mrp.production"
|
||||||
|
|
||||||
agreement_id = fields.Many2one('agreement', 'Agreement')
|
agreement_id = fields.Many2one("agreement", "Agreement")
|
||||||
serviceprofile_id = fields.Many2one('agreement.serviceprofile',
|
serviceprofile_id = fields.Many2one("agreement.serviceprofile", "Service Profile")
|
||||||
'Service Profile')
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="action_mrp_production_agreement_specific"
|
<record id="action_mrp_production_agreement_specific" model="ir.actions.act_window">
|
||||||
model="ir.actions.act_window">
|
|
||||||
<field name="name">Manufacture Orders</field>
|
<field name="name">Manufacture Orders</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">mrp.production</field>
|
<field name="res_model">mrp.production</field>
|
||||||
@@ -19,17 +18,18 @@
|
|||||||
<record id="partner_agreement_form_view" model="ir.ui.view">
|
<record id="partner_agreement_form_view" model="ir.ui.view">
|
||||||
<field name="name">agreement.form.mrp</field>
|
<field name="name">agreement.form.mrp</field>
|
||||||
<field name="model">agreement</field>
|
<field name="model">agreement</field>
|
||||||
<field name="inherit_id"
|
<field name="inherit_id" ref="agreement_legal.partner_agreement_form_view" />
|
||||||
ref="agreement_legal.partner_agreement_form_view"/>
|
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[@name='button_box']" position="inside">
|
<xpath expr="//div[@name='button_box']" position="inside">
|
||||||
<button name="%(action_mrp_production_agreement_specific)d"
|
<button
|
||||||
|
name="%(action_mrp_production_agreement_specific)d"
|
||||||
type="action"
|
type="action"
|
||||||
class="oe_stat_button" icon="fa-wrench">
|
class="oe_stat_button"
|
||||||
|
icon="fa-wrench"
|
||||||
|
>
|
||||||
<div class="o_field_widget o_stat_info">
|
<div class="o_field_widget o_stat_info">
|
||||||
<span class="o_stat_value">
|
<span class="o_stat_value">
|
||||||
<field name="mo_count" widget="statinfo"
|
<field name="mo_count" widget="statinfo" nolabel="1" />
|
||||||
nolabel="1"/>
|
|
||||||
</span>
|
</span>
|
||||||
<span class="o_stat_text">MOs</span>
|
<span class="o_stat_text">MOs</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,8 +8,10 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='bom_id']" position="after">
|
<xpath expr="//field[@name='bom_id']" position="after">
|
||||||
<field name="agreement_id" />
|
<field name="agreement_id" />
|
||||||
<field name="serviceprofile_id"
|
<field
|
||||||
domain="[('agreement_id', '=', agreement_id)]"/>
|
name="serviceprofile_id"
|
||||||
|
domain="[('agreement_id', '=', agreement_id)]"
|
||||||
|
/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -21,9 +23,12 @@
|
|||||||
<field name="inherit_id" ref="mrp.view_mrp_production_filter" />
|
<field name="inherit_id" ref="mrp.view_mrp_production_filter" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//group" position="inside">
|
<xpath expr="//group" position="inside">
|
||||||
<filter string="Service Profile" name="serviceprofile_id"
|
<filter
|
||||||
|
string="Service Profile"
|
||||||
|
name="serviceprofile_id"
|
||||||
domain="[]"
|
domain="[]"
|
||||||
context="{'group_by':'serviceprofile_id'}"/>
|
context="{'group_by':'serviceprofile_id'}"
|
||||||
|
/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
1
setup/agreement_mrp/odoo/addons/agreement_mrp
Symbolic link
1
setup/agreement_mrp/odoo/addons/agreement_mrp
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../../../agreement_mrp
|
||||||
6
setup/agreement_mrp/setup.py
Normal file
6
setup/agreement_mrp/setup.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user