diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index abae5562b2c..e18dab2d332 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -82,21 +82,21 @@ - Assets - (test) - X10 - view - - - + Assets - (test) + X10 + view + + + - Liabilities - (test) - X11 - view - - - + Liabilities - (test) + X11 + view + + + @@ -208,23 +208,32 @@ - Income - (test) - X20 - view - - - + Income - (test) + X20 + view + + + + + + + Foreign Exchange Gain - (test) + X201 + other + + + - Expense - (test) - X21 - view - - - + Expense - (test) + X21 + view + + + - + X200 Revenue - (test) @@ -273,6 +282,14 @@ + + Foreign Exchange Loss - (test) + X2111 + other + + + + diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 0e078820062..bffb1fc53b8 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -167,6 +167,20 @@ and users"), 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], } + def onchange_partner_address_id(self, cr, uid, ids, add, email=False): + """This function returns value of partner email based on Partner Address + @param self: The object pointer + @param cr: the current row, from the database cursor, + @param uid: the current user’s ID for security checks, + @param ids: List of case IDs + @param add: Id of Partner's address + @email: Partner's email ID + """ + if not add: + return {'value': {'email_from': False, 'country_id': False}} + address = self.pool.get('res.partner.address').browse(cr, uid, add) + return {'value': {'email_from': address.email, 'phone': address.phone, 'country_id': address.country_id.id}} + def case_open(self, cr, uid, ids, *args): """Overrides cancel for crm_case for setting Open Date @param self: The object pointer diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 39c65cb6faf..590aa9931ee 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -91,7 +91,7 @@ - +