[ADD] repair: add Responsible field on Repair Order
task- 1945878 closes odoo/odoo#35056 Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
<field name="address_id" ref="base.res_partner_address_1"/>
|
||||
<field name="guarantee_limit" eval="datetime.today().strftime('%Y-%m-%d')"/>
|
||||
<field name="invoice_method">none</field>
|
||||
<field name="user_id"/>
|
||||
<field name="product_id" ref="product.product_product_3"/>
|
||||
<field name="product_uom" ref="uom.product_uom_unit"/>
|
||||
<field name="partner_invoice_id" ref="base.res_partner_address_1"/>
|
||||
@@ -43,6 +44,7 @@
|
||||
<field name="address_id" ref="base.res_partner_address_1"/>
|
||||
<field name="guarantee_limit" eval="datetime.today().strftime('%Y-%m-%d')"/>
|
||||
<field name="invoice_method">after_repair</field>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_invoice_id" ref="base.res_partner_address_1"/>
|
||||
<field name="location_id" ref="stock.stock_location_stock"/>
|
||||
<field name="operations" model="repair.line" eval="[(5, 0, 0), (0, 0, {
|
||||
@@ -72,6 +74,7 @@
|
||||
<field name="address_id" ref="base.res_partner_address_1"/>
|
||||
<field name="guarantee_limit" eval="datetime.today().strftime('%Y-%m-%d')"/>
|
||||
<field name="invoice_method">b4repair</field>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_invoice_id" ref="base.res_partner_address_1"/>
|
||||
<field name="location_id" ref="stock.stock_location_14"/>
|
||||
<field name="operations" model="repair.line" eval="[(5, 0, 0), (0, 0, {
|
||||
|
||||
@@ -105,6 +105,7 @@ class Repair(models.Model):
|
||||
copy=True, readonly=True, states={'draft': [('readonly', False)]})
|
||||
internal_notes = fields.Text('Internal Notes')
|
||||
quotation_notes = fields.Text('Quotation Notes')
|
||||
user_id = fields.Many2one('res.users', string="Responsible", default=lambda self: self.env.user)
|
||||
company_id = fields.Many2one(
|
||||
'res.company', 'Company',
|
||||
default=lambda self: self.env.company)
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
<field name="lot_id" domain="[('product_id', '=', product_id)]" context="{'default_product_id': product_id}" groups="stock.group_production_lot" attrs="{'required':[('tracking', 'in', ['serial', 'lot'])], 'invisible': [('tracking', 'not in', ['serial', 'lot'])], 'readonly': [('state', '=', 'done')]}"/>
|
||||
<field name="partner_id" widget="res_partner_many2one" attrs="{'required':[('invoice_method','!=','none')]}" context="{'show_vat': True}"/>
|
||||
<field name="address_id" groups="sale.group_delivery_invoice_address"/>
|
||||
<field name="user_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="location_id" options="{'no_create': True}"/>
|
||||
|
||||
Reference in New Issue
Block a user