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/caldav/calendar.py b/addons/caldav/calendar.py
index 9a4e948cbe1..01c35880fbb 100644
--- a/addons/caldav/calendar.py
+++ b/addons/caldav/calendar.py
@@ -186,6 +186,8 @@ def map_data(cr, uid, obj, context=None):
if field_type == 'selection':
if not map_val:
continue
+ if type(map_val) == list and len(map_val): #TOFIX: why need to check this
+ map_val = map_val[0]
mapping = obj.__attribute__[map_dict].get('mapping', False)
if mapping:
map_val = mapping.get(map_val.lower(), 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 @@
/>
+
-
",
'email_id': fields.char('From Email',
size=120, required=True,
readonly=True, states={'draft':[('readonly', False)]} ,
- help="eg: yourname@yourdomain.com "),
+ help="eg: 'john@doe.com' or 'John Doe '"),
'smtpserver': fields.char('Server',
size=120, required=True,
readonly=True, states={'draft':[('readonly', False)]},
- help="Enter name of outgoing server, eg:smtp.gmail.com "),
- 'smtpport': fields.integer('SMTP Port ',
+ help="Enter name of outgoing server, eg: smtp.yourdomain.com"),
+ 'smtpport': fields.integer('SMTP Port',
size=64, required=True,
readonly=True, states={'draft':[('readonly', False)]},
- help="Enter port number,eg:SMTP-587 "),
+ help="Enter port number, eg: 25 or 587"),
'smtpuname': fields.char('User Name',
size=120, required=False,
readonly=True, states={'draft':[('readonly', False)]},
diff --git a/addons/email_template/email_template_account_view.xml b/addons/email_template/email_template_account_view.xml
index 201f32db726..0c30d7d478f 100644
--- a/addons/email_template/email_template_account_view.xml
+++ b/addons/email_template/email_template_account_view.xml
@@ -20,12 +20,12 @@
+
-
@@ -55,14 +55,15 @@
email_template.account
tree
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -72,7 +73,7 @@
email_template.account
search
-
+
diff --git a/addons/email_template/email_template_mailbox_view.xml b/addons/email_template/email_template_mailbox_view.xml
index 586195155bd..38757ba7d68 100644
--- a/addons/email_template/email_template_mailbox_view.xml
+++ b/addons/email_template/email_template_mailbox_view.xml
@@ -89,7 +89,7 @@
diff --git a/addons/email_template/email_template_view.xml b/addons/email_template/email_template_view.xml
index 8d851f17641..36e7a5f9037 100644
--- a/addons/email_template/email_template_view.xml
+++ b/addons/email_template/email_template_view.xml
@@ -133,9 +133,9 @@
-
+
@@ -151,15 +151,17 @@
tree
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -170,14 +172,21 @@
search
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr/board_hr_view.xml b/addons/hr/board_hr_view.xml
index 6408b11c799..58204352ac4 100644
--- a/addons/hr/board_hr_view.xml
+++ b/addons/hr/board_hr_view.xml
@@ -32,14 +32,6 @@
menu
-
-
-
diff --git a/addons/hr_expense/board_hr_expense_view.xml b/addons/hr_expense/board_hr_expense_view.xml
index cc5488a8f2e..4b06cd758b1 100644
--- a/addons/hr_expense/board_hr_expense_view.xml
+++ b/addons/hr_expense/board_hr_expense_view.xml
@@ -2,6 +2,13 @@
+
+
My Expenses
hr.expense.expense
diff --git a/addons/hr_holidays/board_hr_holidays_view.xml b/addons/hr_holidays/board_hr_holidays_view.xml
index 4f3f2142447..20bd2aaecb8 100644
--- a/addons/hr_holidays/board_hr_holidays_view.xml
+++ b/addons/hr_holidays/board_hr_holidays_view.xml
@@ -1,7 +1,14 @@
-
+
+
+
My Leaves
ir.actions.act_window
diff --git a/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml b/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml
index 70d36184980..942d24f2fe8 100644
--- a/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml
+++ b/addons/hr_timesheet_sheet/board_hr_timesheet_view.xml
@@ -1,6 +1,13 @@
+
+
Timesheets by Month
ir.actions.act_window
diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py
index 350c9f70092..3a40aac2649 100644
--- a/addons/mail_gateway/mail_gateway.py
+++ b/addons/mail_gateway/mail_gateway.py
@@ -176,6 +176,14 @@ class mailgate_message(osv.osv):
'''
Mailgateway Message
'''
+ def truncate_data(self, cr, uid, data, context=None):
+ data_list = data and data.split('\n') or []
+ if len(data_list) > 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/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index c9383b53b15..4fd4fda5253 100644
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -135,12 +135,12 @@ Normal - the campaign runs normally and automatically sends all emails and repor
if activity.type != 'email':
continue
if not activity.email_template_id.from_account:
- raise osv.except_osv(_("Error"), _("The campaign cannot be started: an email account is missing in the email activity '%s'")%activity.name)
+ raise osv.except_osv(_("Error"), _("The campaign cannot be started: the email account is missing in email activity '%s'")%activity.name)
if activity.email_template_id.from_account.state != 'approved':
- raise osv.except_osv(_("Error"), _("The campaign cannot be started: the email account is not approved in the email activity '%s'")%activity.name)
+ raise osv.except_osv(_("Error"), _("The campaign cannot be started: the email account is not approved in email activity '%s'")%activity.name)
if not has_start and not has_signal_without_from:
- raise osv.except_osv(_("Error"), _("The campaign hasn't any starting activity nor any activity with a signal and no previous activity."))
+ raise osv.except_osv(_("Error"), _("The campaign cannot be started: it doesn't have any starting activity (or any activity with a signal and no previous activity)"))
return self.write(cr, uid, ids, {'state': 'running'})
@@ -213,27 +213,31 @@ class marketing_campaign_segment(osv.osv):
_name = "marketing.campaign.segment"
_description = "Campaign Segment"
+ def _get_next_sync(self, cr, uid, ids, fn, args, context=None):
+ # next auto sync date is same for all segments
+ sync_job = self.pool.get('ir.model.data').get_object(cr, uid, 'marketing_campaign', 'ir_cron_marketing_campaign_every_day', context=context)
+ next_sync = sync_job and sync_job.nextcall or False
+ return dict.fromkeys(ids, next_sync)
+
_columns = {
'name': fields.char('Name', size=64,required=True),
- 'campaign_id': fields.many2one('marketing.campaign', 'Campaign',
- required=True, select=1, ondelete="cascade"),
- 'object_id': fields.related('campaign_id','object_id',
- type='many2one', relation='ir.model',
- string='Object'),
- 'ir_filter_id': fields.many2one('ir.filters', 'Filter', help="Filter to select the matching resource records that belong to this segment. New filters can be created and saved using the advanced search on the list view of the Resource"),
+ 'campaign_id': fields.many2one('marketing.campaign', 'Campaign', required=True, select=1, ondelete="cascade"),
+ 'object_id': fields.related('campaign_id','object_id', type='many2one', relation='ir.model', string='Resource'),
+ 'ir_filter_id': fields.many2one('ir.filters', 'Filter', help="Filter to select the matching resource records that belong to this segment. New filters can be created and saved using the advanced search on the list view of the Resource. If no filter is set, all records are selected without filtering. The synchronization mode may also add a criterion to the filter."),
'sync_last_date': fields.datetime('Last Synchronization', help="Date on which this segment was synchronized last time (automatically or manually)"),
- 'sync_mode': fields.selection([('create_date', 'If record created after last sync'),
- ('write_date', 'If record modified after last sync (no duplicates)'),
+ 'sync_mode': fields.selection([('create_date', 'Only records created after last sync'),
+ ('write_date', 'Only records modified after last sync (no duplicates)'),
('all', 'All records (no duplicates)')],
- 'Workitem creation mode',
- help="Determines how new campaign workitems are created for resource records matching this segment. This is used when segments are synchronized manually, or automatically via the scheduled job."),
+ 'Synchronization mode',
+ help="Determines an additional criterion to add to the filter when selecting new records to inject in the campaign."),
'state': fields.selection([('draft', 'Draft'),
('running', 'Running'),
('done', 'Done'),
('cancelled', 'Cancelled')],
'State',),
- 'date_run': fields.datetime('Launching Date', help="Initial start date of this segment."),
+ 'date_run': fields.datetime('Launch Date', help="Initial start date of this segment."),
'date_done': fields.datetime('End Date', help="Date this segment was last closed or cancelled."),
+ 'date_next_sync': fields.function(_get_next_sync, method=True, string='Next Synchronization', type='datetime', help="Next time the synchronization job is scheduled to run automatically"),
}
_defaults = {
@@ -264,7 +268,6 @@ class marketing_campaign_segment(osv.osv):
if model_name:
mod_name = model_name[0]['model']
res['domain'] = {'ir_filter_id': [('model_id', '=', mod_name)]}
- res['context'] = {'default_model_id': model_name[0]['model']}
else:
res['value'] = {'ir_filter_id': False}
return res
@@ -594,7 +597,7 @@ class marketing_campaign_workitem(osv.osv):
'campaign_id': fields.related('activity_id', 'campaign_id',
type='many2one', relation='marketing.campaign', string='Campaign', readonly=True, store=True),
'object_id': fields.related('activity_id', 'campaign_id', 'object_id',
- type='many2one', relation='ir.model', string='Resource', select=1, readonly=True),
+ type='many2one', relation='ir.model', string='Resource', select=1, readonly=True, store=True),
'res_id': fields.integer('Resource ID', select=1, readonly=True),
'res_name': fields.function(_res_name_get, method=True, string='Resource Name', fnct_search=_resource_search, type="char", size=64),
'date': fields.datetime('Execution Date', help='If date is not set, this workitem has to be run manually', readonly=True),
diff --git a/addons/marketing_campaign/marketing_campaign_data.xml b/addons/marketing_campaign/marketing_campaign_data.xml
index 42ed4d12118..4f337b1d60e 100644
--- a/addons/marketing_campaign/marketing_campaign_data.xml
+++ b/addons/marketing_campaign/marketing_campaign_data.xml
@@ -5,7 +5,7 @@
- Check Marketing Campaign Activities
+ Marketing Campaign: Campaign workitems processing
1
hours
-1
@@ -14,9 +14,9 @@
-
+
- Check Segment
+ Marketing Campaign: Segment Sync
1
days
-1
@@ -25,6 +25,6 @@
-
+
diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml
index cbcb7fe1b76..7d1c8d3d2bf 100644
--- a/addons/marketing_campaign/marketing_campaign_view.xml
+++ b/addons/marketing_campaign/marketing_campaign_view.xml
@@ -32,14 +32,14 @@
-
+
-
+
@@ -139,18 +139,19 @@
+
-
+
-
+
-
-
-
-
+
+
+
+
@@ -179,6 +180,7 @@
+
@@ -193,9 +195,9 @@
-
-
-
+
+
+
@@ -207,7 +209,7 @@
-
+
@@ -246,6 +248,7 @@
+
@@ -271,37 +274,35 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -333,14 +334,15 @@
tree
+
+
+
-
-
@@ -394,21 +396,28 @@
search
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
@@ -426,7 +435,7 @@
tree,form
- {'group_by': [], 'search_default_todo': 1}
+ {'group_by': [], 'search_default_todo': 1, 'search_default_today': 1}
@@ -443,7 +452,7 @@
diff --git a/addons/marketing_campaign/report/campaign_analysis.py b/addons/marketing_campaign/report/campaign_analysis.py
index aa0e0e01a22..066423c546c 100644
--- a/addons/marketing_campaign/report/campaign_analysis.py
+++ b/addons/marketing_campaign/report/campaign_analysis.py
@@ -44,11 +44,12 @@ class campaign_analysis(osv.osv):
_columns = {
'res_id' : fields.integer('Resource', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
- 'month':fields.selection([('01','January'), ('02','February'),
- ('03','March'), ('04','April'),('05','May'), ('06','June'),
- ('07','July'), ('08','August'), ('09','September'),
- ('10','October'), ('11','November'), ('12','December')],
- 'Month', readonly=True),
+ 'month': fields.selection([('01','January'), ('02','February'),
+ ('03','March'), ('04','April'),('05','May'), ('06','June'),
+ ('07','July'), ('08','August'), ('09','September'),
+ ('10','October'), ('11','November'), ('12','December')],
+ 'Month', readonly=True),
+ 'day': fields.char('Day', size=10, readonly=True),
'date': fields.date('Date', readonly=True),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign',
readonly=True),
@@ -63,6 +64,9 @@ class campaign_analysis(osv.osv):
type="float" ),
'revenue': fields.float('Revenue',digits=(16,2),readonly=True),
'count' : fields.integer('# of Actions', readonly=True),
+ 'state': fields.selection([('todo', 'To Do'),
+ ('exception', 'Exception'), ('done', 'Done'),
+ ('cancelled', 'Cancelled')], 'State', readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'campaign_analysis')
@@ -73,6 +77,7 @@ class campaign_analysis(osv.osv):
min(wi.res_id) as res_id,
to_char(wi.date::date, 'YYYY') as year,
to_char(wi.date::date, 'MM') as month,
+ to_char(wi.date::date, 'YYYY-MM-DD') as day,
wi.date::date as date,
s.campaign_id as campaign_id,
wi.activity_id as activity_id,
diff --git a/addons/marketing_campaign/report/campaign_analysis_view.xml b/addons/marketing_campaign/report/campaign_analysis_view.xml
index d88be86d01e..aa994fcfc48 100644
--- a/addons/marketing_campaign/report/campaign_analysis_view.xml
+++ b/addons/marketing_campaign/report/campaign_analysis_view.xml
@@ -9,6 +9,7 @@
+
@@ -28,7 +29,7 @@
campaign.analysis
search
-
+
-
+
@@ -75,7 +76,7 @@
- Campaigns
+ Campaign Analysis
campaign.analysis
form
tree
diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py
index d402374b5ea..9b6b7d77f7b 100644
--- a/addons/project_mailgate/project_mailgate.py
+++ b/addons/project_mailgate/project_mailgate.py
@@ -120,34 +120,34 @@ class project_tasks(osv.osv):
message_id=message_id, attach=attach, \
context=context)
- def do_draft(self, cr, uid, ids, *args):
- res = super(project_tasks, self).do_draft(cr, uid, ids, *args)
+ def do_draft(self, cr, uid, ids, *args, **kwargs):
+ res = super(project_tasks, self).do_draft(cr, uid, ids, *args, **kwargs)
tasks = self.browse(cr, uid, ids)
self._history(cr, uid, tasks, _('Draft'))
return res
- def do_open(self, cr, uid, ids, *args):
- res = super(project_tasks, self).do_open(cr, uid, ids, *args)
+ def do_open(self, cr, uid, ids, *args, **kwargs):
+ res = super(project_tasks, self).do_open(cr, uid, ids, *args, **kwargs)
tasks = self.browse(cr, uid, ids)
self._history(cr, uid, tasks, _('Open'))
return res
- def do_pending(self, cr, uid, ids, *args):
- res = super(project_tasks, self).do_pending(cr, uid, ids, *args)
+ def do_pending(self, cr, uid, ids, *args, **kwargs):
+ res = super(project_tasks, self).do_pending(cr, uid, ids, *args, **kwargs)
tasks = self.browse(cr, uid, ids)
self._history(cr, uid, tasks, _('Pending'))
return res
- def do_close(self, cr, uid, ids, *args):
- res = super(project_tasks, self).do_close(cr, uid, ids, *args)
+ def do_close(self, cr, uid, ids, *args, **kwargs):
+ res = super(project_tasks, self).do_close(cr, uid, ids, *args, **kwargs)
tasks = self.browse(cr, uid, ids)
for task in tasks:
if task.state == 'done':
self._history(cr, uid, tasks, _('Done'))
return res
- def do_cancel(self, cr, uid, ids, *args):
- res = super(project_tasks, self).do_cancel(cr, uid, ids, *args)
+ def do_cancel(self, cr, uid, ids, *args, **kwargs):
+ res = super(project_tasks, self).do_cancel(cr, uid, ids, *args, **kwargs)
tasks = self.browse(cr, uid, ids)
self._history(cr, uid, tasks, _('Cancel'))
return res
diff --git a/addons/project_mrp/project_mrp.py b/addons/project_mrp/project_mrp.py
index 4e99ee0b281..5f3eb4616be 100644
--- a/addons/project_mrp/project_mrp.py
+++ b/addons/project_mrp/project_mrp.py
@@ -29,22 +29,20 @@ class project_task(osv.osv):
'procurement_id': fields.many2one('procurement.order', 'Procurement', ondelete='set null')
}
- def do_close(self, cr, uid, ids, *args):
- res = super(project_task, self).do_close(cr, uid, ids, *args)
- tasks = self.browse(cr, uid, ids)
- for task in tasks:
+ def _validate_subflows(self, cr, uid, ids):
+ for task in self.browse(cr, uid, ids):
if task.procurement_id:
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'procurement.order', task.procurement_id.id, 'subflow.done', cr)
+
+ def do_close(self, cr, uid, ids, *args, **kwargs):
+ res = super(project_task, self).do_close(cr, uid, ids, *args, **kwargs)
+ self._validate_subflows(cr, uid, ids)
return res
- def do_cancel(self, cr, uid, ids, *args):
- res = super(project_task, self).do_cancel(cr, uid, ids, *args)
- tasks = self.browse(cr, uid, ids)
- for task in tasks:
- if task.procurement_id:
- wf_service = netsvc.LocalService("workflow")
- wf_service.trg_validate(uid, 'procurement.order', task.procurement_id.id, 'subflow.cancel', cr)
+ def do_cancel(self, cr, uid, ids, *args, **kwargs):
+ res = super(project_task, self).do_cancel(cr, uid, ids, *args, **kwargs)
+ self._validate_subflows(cr, uid, ids)
return True
project_task()
diff --git a/addons/sale/__openerp__.py b/addons/sale/__openerp__.py
index ceab22fd98a..2bcb2f2d88f 100644
--- a/addons/sale/__openerp__.py
+++ b/addons/sale/__openerp__.py
@@ -69,19 +69,20 @@
],
'demo_xml': ['sale_demo.xml'],
'test': [
- 'test/data_test.yml',
- 'test/manual_order_policy.yml',
- 'test/prepaid_order_policy.yml',
- 'test/picking_order_policy.yml',
- 'test/postpaid_order_policy.yml',
- 'test/advance_invoice.yml',
- 'test/so_make_line_invoice.yml',
- 'test/sale_procurement.yml',
- 'test/invoice_on_ordered_qty.yml',
- 'test/invoice_on_shipped_qty.yml',
- ],
+ 'test/data_test.yml',
+ 'test/manual_order_policy.yml',
+ 'test/prepaid_order_policy.yml',
+ 'test/picking_order_policy.yml',
+ 'test/postpaid_order_policy.yml',
+ 'test/advance_invoice.yml',
+ 'test/so_make_line_invoice.yml',
+ 'test/sale_procurement.yml',
+ 'test/invoice_on_ordered_qty.yml',
+ 'test/invoice_on_shipped_qty.yml',
+ 'test/sale_order_print.yml',
+ ],
'installable': True,
'active': False,
'certificate': '0058103601429',
}
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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/sale/test/sale_order_print.yml b/addons/sale/test/sale_order_print.yml
new file mode 100644
index 00000000000..def94d8c27e
--- /dev/null
+++ b/addons/sale/test/sale_order_print.yml
@@ -0,0 +1,8 @@
+-
+ In order to test the PDF reports defined on a sale order, we will print a sale order
+-
+ !python {model: sale.order}: |
+ import netsvc, tools, os
+ (data, format) = netsvc.LocalService('report.sale.order').create(cr, uid, [ref('sale.order'),ref('sale.order2')], {}, {})
+ if tools.config['test_report_directory']:
+ file(os.path.join(tools.config['test_report_directory'], 'sale-sale_order.'+format), 'wb+').write(data)
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}