[MERGE] forward port of branch 7.0 up to e2dd18f

This commit is contained in:
Denis Ledoux 2014-11-26 12:35:36 +01:00
commit 02f4f9a572
7 changed files with 17 additions and 14 deletions

View File

@ -1829,10 +1829,10 @@ class res_partner(osv.osv):
''' '''
return partner.commercial_partner_id 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 = default or {}
default.update({'invoice_ids' : []}) 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): class mail_compose_message(osv.Model):

View File

@ -34,14 +34,14 @@
<field name="inherit_id" ref="account.view_account_tax_template_form"/> <field name="inherit_id" ref="account.view_account_tax_template_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field position="after" name="price_include"> <field position="after" name="price_include">
<field groups="base.group_extended" name="tax_discount"/> <field name="tax_discount"/>
</field> </field>
<field name="tax_code_id" position="replace" > <field name="tax_code_id" position="replace" >
<field name="tax_code_id" on_change="onchange_tax_code_id(tax_code_id)" /> <field name="tax_code_id" on_change="onchange_tax_code_id(tax_code_id)" />
</field> </field>
<field position="after" name="amount"> <field position="after" name="tax_discount">
<field groups="base.group_extended" name="base_reduction"/> <field name="base_reduction"/>
<field groups="base.group_extended" name="amount_mva"/> <field name="amount_mva"/>
</field> </field>
</field> </field>
</record> </record>
@ -52,14 +52,14 @@
<field name="inherit_id" ref="account.view_tax_form"/> <field name="inherit_id" ref="account.view_tax_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field position="after" name="price_include"> <field position="after" name="price_include">
<field groups="base.group_extended" name="tax_discount"/> <field name="tax_discount"/>
</field> </field>
<field name="tax_code_id" position="replace" > <field name="tax_code_id" position="replace" >
<field name="tax_code_id" on_change="onchange_tax_code_id(tax_code_id)" /> <field name="tax_code_id" on_change="onchange_tax_code_id(tax_code_id)" />
</field> </field>
<field position="after" name="amount"> <field position="after" name="tax_discount">
<field groups="base.group_extended" name="base_reduction"/> <field name="base_reduction"/>
<field groups="base.group_extended" name="amount_mva"/> <field name="amount_mva"/>
</field> </field>
</field> </field>
</record> </record>

View File

@ -40,7 +40,7 @@ The campaigns are dynamic and multi-channels. The process is as follows:
send, reports to print and send by email, custom actions send, reports to print and send by email, custom actions
* Define input segments that will select the items that should enter the * Define input segments that will select the items that should enter the
campaign (e.g leads from certain countries.) 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 and fine-tune it
* You may also start the real campaign in manual mode, where each action * You may also start the real campaign in manual mode, where each action
requires manual validation requires manual validation

View File

@ -330,7 +330,7 @@ class mrp_bom(osv.osv):
if bom.type == 'phantom' and not bom.bom_lines: if bom.type == 'phantom' and not bom.bom_lines:
newbom = self._bom_find(cr, uid, bom.product_id.id, bom.product_uom.id, properties) 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) 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] result = result + res[0]
result2 = result2 + res[1] result2 = result2 + res[1]

View File

@ -152,6 +152,7 @@ class product_uom(osv.osv):
_defaults = { _defaults = {
'active': 1, 'active': 1,
'rounding': 0.01, 'rounding': 0.01,
'factor': 1,
'uom_type': 'reference', 'uom_type': 'reference',
} }

View File

@ -517,7 +517,7 @@
<field name="factor" <field name="factor"
digits="[42,5]" digits="[42,5]"
attrs="{'invisible':[('uom_type','!=','smaller')], attrs="{'invisible':[('uom_type','!=','smaller')],
'readonly':[('uom_type','!=','smaller')]}"/> 'readonly':[('uom_type','=','bigger')]}"/>
<field name="factor_inv" <field name="factor_inv"
digits="[42,5]" digits="[42,5]"
attrs="{'invisible':[('uom_type','!=','bigger')], attrs="{'invisible':[('uom_type','!=','bigger')],

View File

@ -118,7 +118,9 @@ class project_work(osv.osv):
vals_line['user_id'] = vals['user_id'] vals_line['user_id'] = vals['user_id']
vals_line['product_id'] = result['product_id'] vals_line['product_id'] = result['product_id']
if vals.get('date'): 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 # Calculate quantity based on employee's product's uom
vals_line['unit_amount'] = vals['hours'] vals_line['unit_amount'] = vals['hours']