@ -1,8 +0,0 @@
# Copyright 2018 Onestein
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def migrate(cr, version):
"""Copy the name to name_on_contract."""
cr.execute("""UPDATE account_analytic_contract_line
SET name_on_contract = name""")
@ -35,7 +35,6 @@ class AccountAnalyticContractLine(models.Model):
)
name_on_contract = fields.Text(
string='Description (on contract)',
required=True,
quantity = fields.Float(
default=1.0,
@ -56,7 +56,7 @@
<tr class="border-black">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-esc="recurring_invoice_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
<span t-esc="o.recurring_invoice_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</table>
@ -79,7 +79,7 @@
<field name="sequence" widget="handle" />
<field name="product_id"/>
<field name="name"/>
<field name="name_on_contract" />
<field name="name_on_contract" required="1" />
<field name="quantity"/>
<field name="uom_id"/>
<field name="automatic_price"/>
@ -37,7 +37,7 @@
<field name="product_id" />
<field name="name" />
<field name="quantity" />
<field name="uom_id" />
<field name="automatic_price" attrs="{'column_invisible': [('parent.contract_type','=','purchase')]}"/>