Merge branch 'mig/14.0/timesheet_description_sale' into '14.0-test'

mig/14.0/timesheet_description_sale into 14.0-test

See merge request hibou-io/hibou-odoo/suite!830
This commit is contained in:
Hibou Bot
2021-03-21 22:30:38 +00:00
4 changed files with 41 additions and 20 deletions

View File

@@ -11,26 +11,6 @@
<xpath expr="//field[@name='timesheet_ids']/tree" position="attributes">
<attribute name="editable"/>
</xpath>
<xpath expr="//field[@name='timesheet_ids']" position="inside">
<form>
<sheet>
<group>
<group>
<field name="company_id" invisible="1"/>
<field name="project_id" invisible="1"/>
<field name="task_id" invisible="1"/>
<field name="user_id" invisible="1" groups="hr_timesheet.group_timesheet_manager"/>
<field name="employee_id" groups="hr_timesheet.group_timesheet_manager"/>
</group>
<group>
<field name="date"/>
<field name="unit_amount" string="Time Spent" widget="float_time"/>
</group>
</group>
<field name="name" nolabel="1" widget="text" placeholder="Describe your activity (you can use markdown)" colspan="4"/>
</sheet>
</form>
</xpath>
</field>
</record>

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,21 @@
{
'name': 'Timesheet Description Sale',
'version': '14.0.1.0.0',
'author': 'Hibou Corp. <hello@hibou.io>',
'website': 'https://hibou.io/',
'license': 'AGPL-3',
'category': 'Tools',
'complexity': 'easy',
'description': """
Linker module to inject fields required by timesheets for sales.
""",
'depends': [
'timesheet_description',
'sale_timesheet',
],
'data': [
'views/timesheet_views.xml',
],
'installable': True,
'auto_install': True,
}

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_task_form2_inherit" model="ir.ui.view">
<field name="name">project.task.form.inherit</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="timesheet_description.view_task_form2_inherit" />
<field name="arch" type="xml">
<xpath expr="//field[@name='timesheet_ids']" position="attributes">
<attribute name="context">{'default_project_id': project_id, 'default_task_id': active_id}</attribute>
</xpath>
<xpath expr="//field[@name='timesheet_ids']/tree" position="attributes">
<attribute name="editable"/>
</xpath>
<xpath expr="//field[@name='timesheet_ids']/form//field[@name='project_id']" position="before">
<field name="timesheet_invoice_id" invisible="1"/>
</xpath>
</field>
</record>
</odoo>