mirror of
https://github.com/bringout/oca-mrp.git
synced 2026-04-24 08:12:00 +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,169 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<!-- Both -->
|
||||
<record id="crm_lead_view_form" model="ir.ui.view">
|
||||
<field name="name">CRM - Leads with timesheets</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="inherit_id" ref="crm.crm_lead_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<!-- Main task form action buttons -->
|
||||
<div name="button_box" position="inside">
|
||||
<field name="show_time_control" invisible="1" />
|
||||
<button
|
||||
name="button_start_work"
|
||||
string="Start work"
|
||||
type="object"
|
||||
icon="fa-play-circle text-success"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'start')]}"
|
||||
class="oe_stat_button"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
/>
|
||||
<button
|
||||
name="button_end_work"
|
||||
string="Stop work"
|
||||
type="object"
|
||||
icon="fa-stop-circle text-warning"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'stop')]}"
|
||||
class="oe_stat_button"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
/>
|
||||
</div>
|
||||
<!-- New fields -->
|
||||
<field name="user_id" position="after">
|
||||
<field name="project_id" invisible="1" />
|
||||
<field
|
||||
name="project_id"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
/>
|
||||
</field>
|
||||
<page name="extra" position="after">
|
||||
<page string="Timesheet" groups="hr_timesheet.group_hr_timesheet_user">
|
||||
<field name="timesheet_ids" invisible="1" />
|
||||
<field
|
||||
name="timesheet_ids"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
context="{'default_project_id': project_id, 'default_user_id': uid, 'tree_view_ref': 'hr_timesheet.timesheet_view_tree_user', 'form_view_ref': 'hr_timesheet.hr_timesheet_line_form'}"
|
||||
/>
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
<!-- Leads -->
|
||||
<record id="view_crm_lead_kanban" model="ir.ui.view">
|
||||
<field name="name">Add timesheet time controls to lead kanban</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="inherit_id" ref="crm.view_crm_lead_kanban" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('oe_kanban_bottom_left')]" position="inside">
|
||||
<field name="show_time_control" invisible="1" />
|
||||
<a
|
||||
name="button_start_work"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'start')]}"
|
||||
class="o_kanban_inline_block text-success"
|
||||
string="Start work"
|
||||
tabindex="-1"
|
||||
type="object"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
><i class="fa fa-lg fa-play-circle" title="Start" /></a>
|
||||
<a
|
||||
name="button_end_work"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'stop')]}"
|
||||
class="o_kanban_inline_block text-warning"
|
||||
string="Stop work"
|
||||
tabindex="-1"
|
||||
type="object"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
><i class="fa fa-lg fa-stop-circle" title="Stop" /></a>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="crm_case_tree_view_leads" model="ir.ui.view">
|
||||
<field name="name">Add timesheet time controls to lead tree</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="inherit_id" ref="crm.crm_case_tree_view_leads" />
|
||||
<field name="arch" type="xml">
|
||||
<tree position="inside">
|
||||
<field name="show_time_control" invisible="1" />
|
||||
<button
|
||||
name="button_start_work"
|
||||
string="Start work"
|
||||
tabindex="-1"
|
||||
type="object"
|
||||
icon="fa-play-circle text-success"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'start')]}"
|
||||
class="oe_stat_button"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
/>
|
||||
<button
|
||||
name="button_end_work"
|
||||
string="Stop work"
|
||||
tabindex="-1"
|
||||
type="object"
|
||||
icon="fa-stop-circle text-warning"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'stop')]}"
|
||||
class="oe_stat_button"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!-- Opportunities -->
|
||||
<record id="crm_case_kanban_view_leads" model="ir.ui.view">
|
||||
<field name="name">Add timesheet time controls to opportunity kanban</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="inherit_id" ref="crm.crm_case_kanban_view_leads" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('oe_kanban_bottom_left')]" position="inside">
|
||||
<field name="show_time_control" invisible="1" />
|
||||
<a
|
||||
name="button_start_work"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'start')]}"
|
||||
class="o_kanban_inline_block text-success"
|
||||
string="Start work"
|
||||
tabindex="-1"
|
||||
type="object"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
><i class="fa fa-lg fa-play-circle" title="Start" /></a>
|
||||
<a
|
||||
name="button_end_work"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'stop')]}"
|
||||
class="o_kanban_inline_block text-warning"
|
||||
string="Stop work"
|
||||
tabindex="-1"
|
||||
type="object"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
><i class="fa fa-lg fa-stop-circle" title="Stop" /></a>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="crm_case_tree_view_oppor" model="ir.ui.view">
|
||||
<field name="name">Add timesheet time controls to opportunity tree</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="inherit_id" ref="crm.crm_case_tree_view_oppor" />
|
||||
<field name="arch" type="xml">
|
||||
<tree position="inside">
|
||||
<field name="show_time_control" invisible="1" />
|
||||
<button
|
||||
name="button_start_work"
|
||||
string="Start work"
|
||||
tabindex="-1"
|
||||
type="object"
|
||||
icon="fa-play-circle text-success"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'start')]}"
|
||||
class="oe_stat_button"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
/>
|
||||
<button
|
||||
name="button_end_work"
|
||||
string="Stop work"
|
||||
tabindex="-1"
|
||||
type="object"
|
||||
icon="fa-stop-circle text-warning"
|
||||
attrs="{'invisible': [('show_time_control', '!=', 'stop')]}"
|
||||
class="oe_stat_button"
|
||||
groups="hr_timesheet.group_hr_timesheet_user"
|
||||
/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="hr_timesheet_line_tree" model="ir.ui.view">
|
||||
<field name="name">Timesheet with lead/opportunity</field>
|
||||
<field name="model">account.analytic.line</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="task_id" position="after">
|
||||
<field name="lead_id" invisible="1" />
|
||||
<field
|
||||
name="lead_id"
|
||||
invisible="context.get('base_model_name') == 'crm.lead'"
|
||||
groups="sales_team.group_sale_salesman"
|
||||
optional="show"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record id="hr_timesheet_line_form" model="ir.ui.view">
|
||||
<field name="name">Lead/opportunity in timesheet line form</field>
|
||||
<field name="model">account.analytic.line</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="task_id" position="after">
|
||||
<field name="lead_id" invisible="1" />
|
||||
<field name="lead_id" groups="sales_team.group_sale_salesman" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue