diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 0cb9165490e..9b355c1fece 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -109,6 +109,8 @@
+
+
@@ -194,6 +196,8 @@
+
+
@@ -286,6 +290,8 @@
+
+
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index 9127d64cad3..773fa55e44d 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -1471,6 +1471,24 @@ account_invoice_line()
class account_invoice_tax(osv.osv):
_name = "account.invoice.tax"
_description = "Invoice Tax"
+
+ def _count_factor(self, cr, uid, ids, name, args, context=None):
+ res = {}
+ for invoice_tax in self.browse(cr, uid, ids, context=context):
+ res[invoice_tax.id] = {
+ 'factor_base': 1.0,
+ 'factor_tax': 1.0,
+ }
+ if invoice_tax.amount <> 0.0:
+ factor_tax = invoice_tax.tax_amount / invoice_tax.amount
+ res[invoice_tax.id]['factor_tax'] = factor_tax
+
+ if invoice_tax.base <> 0.0:
+ factor_base = invoice_tax.base_amount / invoice_tax.base
+ res[invoice_tax.id]['factor_base'] = factor_base
+
+ return res
+
_columns = {
'invoice_id': fields.many2one('account.invoice', 'Invoice Line', ondelete='cascade', select=True),
'name': fields.char('Tax Description', size=64, required=True),
@@ -1485,33 +1503,34 @@ class account_invoice_tax(osv.osv):
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="The tax basis of the tax declaration."),
'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Account')),
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True),
+ 'factor_base' : fields.function(_count_factor, method=True, string='Multipication factor for Base code', type='float', multi="all"),
+ 'factor_tax' : fields.function(_count_factor, method=True, string='Multipication factor Tax code', type='float', multi="all")
}
def base_change(self, cr, uid, ids, base, currency_id=False, company_id=False, date_invoice=False):
cur_obj = self.pool.get('res.currency')
company_obj = self.pool.get('res.company')
company_currency = False
+ factor = 1
+ if ids:
+ factor = self.read(cr, uid, ids[0], ['factor_base'])['factor_base']
if company_id:
company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0]
if currency_id and company_currency:
- base = cur_obj.compute(cr, uid, currency_id, company_currency, base, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
+ base = cur_obj.compute(cr, uid, currency_id, company_currency, base*factor, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
return {'value': {'base_amount':base}}
def amount_change(self, cr, uid, ids, amount, currency_id=False, company_id=False, date_invoice=False):
cur_obj = self.pool.get('res.currency')
company_obj = self.pool.get('res.company')
company_currency = False
- tax_sign = 1
+ factor = 1
if ids:
- tax_amount = self.read(cr, uid, ids[0], ['tax_amount'])['tax_amount']
- if tax_amount < 0:
- tax_sign = -1
- elif tax_amount == 0:
- tax_sign = 0
+ factor = self.read(cr, uid, ids[0], ['factor_tax'])['factor_tax']
if company_id:
company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0]
if currency_id and company_currency:
- amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount*tax_sign, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
+ amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount*factor, context={'date': date_invoice or time.strftime('%Y-%m-%d')}, round=False)
return {'value': {'tax_amount': amount}}
_order = 'sequence'
diff --git a/addons/account_invoice_layout/account_invoice_layout_report.xml b/addons/account_invoice_layout/account_invoice_layout_report.xml
index 4b21fcd5b33..ba7f44f0661 100644
--- a/addons/account_invoice_layout/account_invoice_layout_report.xml
+++ b/addons/account_invoice_layout/account_invoice_layout_report.xml
@@ -8,5 +8,14 @@
name="account.invoice.layout"
rml="account_invoice_layout/report/report_account_invoice_layout.rml"
auto="False"/>
+
+
+
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 5d5fb5d3114..d4b08ad2b44 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -119,7 +119,7 @@ class crm_lead(crm_case, osv.osv):
'write_date': fields.datetime('Update Date' , readonly=True),
# Lead fields
- 'categ_id': fields.many2one('crm.case.categ', 'Lead Source', \
+ 'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]"),
'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', \
@@ -148,7 +148,7 @@ class crm_lead(crm_case, osv.osv):
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
- 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True),
+ 'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
'partner_assigned_id': fields.many2one('res.partner', 'Assigned Partner', help="Partner this case has been forwarded/assigned to.", select=True),
'date_assign': fields.date('Assignation Date', help="Last date this case was forwarded/assigned to a partner"),
}
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index b70174e8989..9517edc5f3a 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -57,6 +57,9 @@
+
@@ -144,9 +147,6 @@
-
@@ -265,9 +265,6 @@
-
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index f67ad93e134..0be6e34e1a6 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -36,8 +36,6 @@
-
@@ -55,9 +53,9 @@
attrs="{'invisible':[('partner_id','!=',False)]}"/>
+ string="Contact"
+ on_change="onchange_partner_address_id(partner_address_id, email_from)"
+ colspan="1" />
@@ -142,9 +140,9 @@
-
-
-
+
+
+
@@ -236,7 +234,7 @@
-
+
@@ -250,9 +248,6 @@
-
@@ -303,12 +298,12 @@
/>
+
-
3:
+ res = '\n\t'.join(data_list[:3]) + '...'
+ else:
+ res = '\n\t'.join(data_list)
+ return res
+
def _get_display_text(self, cr, uid, ids, name, arg, context=None):
if context is None:
context = {}
@@ -186,11 +194,14 @@ class mailgate_message(osv.osv):
if message.history:
msg_txt += (message.email_from or '/') + _(' wrote on ') + format_date_tz(message.date, tz) + ':\n\t'
if message.description:
- msg_txt += '\n\t'.join(message.description.split('\n')[:3]) + '...'
+ msg_txt += self.truncate_data(cr, uid, message.description, context=context)
else:
- msg_txt = (message.user_id.name or '/') + _(' on ') + format_date_tz(message.date, tz) + ':\n\t'
+ msg_txt = (message.user_id.name or '/') + _(' on ') + format_date_tz(message.date, tz) + ':\n\t'
if message.name == _('Opportunity'):
msg_txt += _("Converted to Opportunity")
+ elif message.name == _('Note'):
+ msg_txt = (message.user_id.name or '/') + _(' added note on ') + format_date_tz(message.date, tz) + ':\n\t'
+ msg_txt += self.truncate_data(cr, uid, message.description, context=context)
else:
msg_txt += _("Changed Status to: ") + message.name
result[message.id] = msg_txt
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 6f21e925e1a..3de53f2ccf9 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -80,10 +80,9 @@
+
-
-
@@ -262,12 +261,11 @@
+
-
+
-
-
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 108237576a2..f9fd2ed2bd2 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -245,7 +245,7 @@
-
+
@@ -549,7 +549,7 @@
form
-
-
+ id="act_stock_picking_move_wizard"/>
+
stock.picking.calendar
stock.picking
@@ -597,8 +597,7 @@
-
-
+
@@ -1124,7 +1123,7 @@
-
+
@@ -1335,7 +1334,7 @@
-
+
@@ -1790,7 +1789,7 @@
ir.actions.act_window
form
tree,form
- ['|','&',('picking_id','=',False),('location_id.usage', 'in', ['customer','supplier']),'&',('picking_id','!=',False),('picking_id.type','=','in')]
+ ['|','&',('picking_id','=',False),('location_id.usage', 'in', ['customer','supplier']),'&',('picking_id','!=',False),('picking_id.type','=','in')]
{"search_default_receive":1}