[IMP] project: move partner_id in project form view
Before this commit, when the project is billable, we need to define a customer to have the list of SOL. The problem is the customer field is in "Settings" tab and not "Invoicing", it can be confused for the user to directly understand why he does not have the list of SO. This commit moves the customer field (that is partner_id) to the main sheet of the form view. Thus, the user can see directly if the customer is set or not in the project. task-2424382
This commit is contained in:
@@ -276,13 +276,13 @@
|
||||
<h1>
|
||||
<field name="name" class="o_text_overflow" placeholder="Project Name"/>
|
||||
</h1>
|
||||
<div name="options_active">
|
||||
<div>
|
||||
<label for="label_tasks" class="oe_inline" string="Name of the tasks:"/>
|
||||
<field name="label_tasks" class="oe_inline oe_input_align"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="label_tasks" string="Name of the tasks"/>
|
||||
<field name="partner_id" widget="res_partner_many2one"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="description_page" string="Description">
|
||||
<field name="description" nolabel="1" placeholder="Describe your project..." type="html"/>
|
||||
@@ -293,11 +293,6 @@
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="user_id" string="Project Manager" widget="many2one_avatar_user" attrs="{'readonly':[('active','=',False)]}" domain="[('share', '=', False)]"/>
|
||||
<field name="partner_id" string="Customer" widget="res_partner_many2one"/>
|
||||
<field name="partner_phone" widget="phone"
|
||||
attrs="{'invisible': [('partner_id', '=', False)]}"/>
|
||||
<field name="partner_email" widget="email"
|
||||
attrs="{'invisible': [('partner_id', '=', False)]}"/>
|
||||
<div name="alias_def" colspan="2" attrs="{'invisible': [('alias_domain', '=', False)]}">
|
||||
<!-- Always display the whole alias in edit mode. It depends in read only -->
|
||||
<label for="alias_enabled" class="font-weight-bold" string="Create tasks by sending an email"/>
|
||||
|
||||
@@ -96,7 +96,7 @@ class AccountAnalyticLine(models.Model):
|
||||
return map_entry.sale_line_id
|
||||
if task.sale_line_id or project.sale_line_id:
|
||||
return task.sale_line_id or project.sale_line_id
|
||||
return self.env['sale.order.line']
|
||||
return False
|
||||
|
||||
def _timesheet_get_portal_domain(self):
|
||||
""" Only the timesheets with a product invoiced on delivered quantity are concerned.
|
||||
|
||||
Reference in New Issue
Block a user