'''
return partner.commercial_partner_id
- def copy(self, cr, uid, id, default=None, context=None):
+ def copy_data(self, cr, uid, id, default=None, context=None):
default = default or {}
default.update({'invoice_ids' : []})
- return super(res_partner, self).copy(cr, uid, id, default, context)
+ return super(res_partner, self).copy_data(cr, uid, id, default=default, context=context)
class mail_compose_message(osv.Model):
<field name="inherit_id" ref="account.view_account_tax_template_form"/>
<field name="arch" type="xml">
<field position="after" name="price_include">
- <field groups="base.group_extended" name="tax_discount"/>
+ <field name="tax_discount"/>
</field>
<field name="tax_code_id" position="replace" >
<field name="tax_code_id" on_change="onchange_tax_code_id(tax_code_id)" />
</field>
- <field position="after" name="amount">
- <field groups="base.group_extended" name="base_reduction"/>
- <field groups="base.group_extended" name="amount_mva"/>
+ <field position="after" name="tax_discount">
+ <field name="base_reduction"/>
+ <field name="amount_mva"/>
</field>
</field>
</record>
<field name="inherit_id" ref="account.view_tax_form"/>
<field name="arch" type="xml">
<field position="after" name="price_include">
- <field groups="base.group_extended" name="tax_discount"/>
+ <field name="tax_discount"/>
</field>
<field name="tax_code_id" position="replace" >
<field name="tax_code_id" on_change="onchange_tax_code_id(tax_code_id)" />
</field>
- <field position="after" name="amount">
- <field groups="base.group_extended" name="base_reduction"/>
- <field groups="base.group_extended" name="amount_mva"/>
+ <field position="after" name="tax_discount">
+ <field name="base_reduction"/>
+ <field name="amount_mva"/>
</field>
</field>
</record>
send, reports to print and send by email, custom actions
* Define input segments that will select the items that should enter the
campaign (e.g leads from certain countries.)
- * Run you campaign in simulation mode to test it real-time or accelerated,
+ * Run your campaign in simulation mode to test it real-time or accelerated,
and fine-tune it
* You may also start the real campaign in manual mode, where each action
requires manual validation
if bom.type == 'phantom' and not bom.bom_lines:
newbom = self._bom_find(cr, uid, bom.product_id.id, bom.product_uom.id, properties)
- if newbom:
+ if newbom and newbom != bom.id:
res = self._bom_explode(cr, uid, self.browse(cr, uid, [newbom])[0], factor*bom.product_qty, properties, addthis=True, level=level+10)
result = result + res[0]
result2 = result2 + res[1]
_defaults = {
'active': 1,
'rounding': 0.01,
+ 'factor': 1,
'uom_type': 'reference',
}
<field name="factor"
digits="[42,5]"
attrs="{'invisible':[('uom_type','!=','smaller')],
- 'readonly':[('uom_type','!=','smaller')]}"/>
+ 'readonly':[('uom_type','=','bigger')]}"/>
<field name="factor_inv"
digits="[42,5]"
attrs="{'invisible':[('uom_type','!=','bigger')],
vals_line['user_id'] = vals['user_id']
vals_line['product_id'] = result['product_id']
if vals.get('date'):
- vals_line['date' ] = vals['date'][:10]
+ timestamp = datetime.datetime.strptime(vals['date'], tools.DEFAULT_SERVER_DATETIME_FORMAT)
+ ts = fields.datetime.context_timestamp(cr, uid, timestamp, context)
+ vals_line['date'] = ts.strftime(tools.DEFAULT_SERVER_DATE_FORMAT)
# Calculate quantity based on employee's product's uom
vals_line['unit_amount'] = vals['hours']