Twinkle Christian(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-warning-fix-tch into
lp:~openerp-dev/openobject-addons/trunk-test-fix-rga.
Requested reviews:
Ravi Gadhia (OpenERP) (rga-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-warning-fix-tch/+merge/128175
Hello Sir,
I have removed warning type field deprecated.
Kindly Review this.
Thanks,
TCH.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-warning-fix-tch/+merge/128175
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-test-fix-rga.
=== modified file 'account/account_invoice_view.xml'
--- account/account_invoice_view.xml 2012-10-02 20:40:23 +0000
+++ account/account_invoice_view.xml 2012-10-05 07:32:26 +0000
@@ -189,7 +189,7 @@
</group>
<notebook>
<page string="Invoice">
- <field context="{'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False, 'type': type}" name="invoice_line">
+ <field context="{'partner_id': partner_id, 'price_type': context.get('price_type') or False, 'type': type}" name="invoice_line">
<tree string="Invoice lines" editable="bottom">
<field name="product_id"
on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
=== modified file 'account/account_view.xml'
--- account/account_view.xml 2012-09-30 11:46:34 +0000
+++ account/account_view.xml 2012-10-05 07:32:26 +0000
@@ -1549,10 +1549,7 @@
<field name="view_mode">account_reconciliation_list</field>
<field name="help" type="html">
<p>
- Good job!
- </p><p>
- There is nothing to reconcile. All invoices and payments
- have been reconciled, your partner balance is clean.
+ No journal items found.
</p>
</field>
</record>
=== modified file 'account/static/src/xml/account_move_reconciliation.xml'
--- account/static/src/xml/account_move_reconciliation.xml 2012-09-21 13:03:18 +0000
+++ account/static/src/xml/account_move_reconciliation.xml 2012-10-05 07:32:26 +0000
@@ -3,10 +3,17 @@
<templates id="template" xml:space="preserve">
<t t-name="AccountReconciliation">
+ <t t-if="widget.current_partner === null">
+ <div class="oe_view_nocontent">
+ <p>
+ Good job!
+ </p><p>
+ There is nothing to reconcile. All invoices and payments
+ have been reconciled, your partner balance is clean.
+ </p>
+ </div>
+ </t>
<div class="oe_account_reconciliation">
- <t t-if="widget.current_partner === null">
- There is no pending reconciliation.
- </t>
<t t-if="widget.current_partner !== null">
<div>
<div>
=== modified file 'auth_oauth/__openerp__.py'
--- auth_oauth/__openerp__.py 2012-09-25 09:51:19 +0000
+++ auth_oauth/__openerp__.py 2012-10-05 07:32:26 +0000
@@ -34,6 +34,7 @@
'depends': ['base', 'web', 'base_setup'],
'data': [
'auth_oauth_data.xml',
+ 'auth_oauth_data.yml',
'auth_oauth_view.xml',
'security/ir.model.access.csv'
],
=== added file 'auth_oauth/auth_oauth_data.yml'
--- auth_oauth/auth_oauth_data.yml 1970-01-01 00:00:00 +0000
+++ auth_oauth/auth_oauth_data.yml 2012-10-05 07:32:26 +0000
@@ -0,0 +1,6 @@
+-
+ Use database uuid as client_id for OpenERP oauth provider
+-
+ !python {model: ir.config_parameter}: |
+ oauth = self.pool.get('auth.oauth.provider')
+ oauth.write(cr, uid, [ref('provider_openerp')], {'client_id': self.get_param(cr, uid, 'database.uuid')})
=== modified file 'delivery/delivery_view.xml'
--- delivery/delivery_view.xml 2012-09-30 11:18:28 +0000
+++ delivery/delivery_view.xml 2012-10-05 07:32:26 +0000
@@ -322,7 +322,6 @@
<record id="view_picking_withcarrier_in_form" model="ir.ui.view">
<field name="name">delivery.stock.picking_withcarrier.in.form.view</field>
- <field name="type">form</field>
<field name="model">stock.picking.in</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
=== modified file 'mail/mail_followers_view.xml'
--- mail/mail_followers_view.xml 2012-09-17 06:57:40 +0000
+++ mail/mail_followers_view.xml 2012-10-05 07:32:26 +0000
@@ -19,7 +19,6 @@
<record model="ir.ui.view" id="view_mail_subscription_form">
<field name="name">mail.followers.form</field>
<field name="model">mail.followers</field>
- <field name="type">form</field>
<field name="arch" type="xml">
<form string="Followers Form" version="7.0">
<sheet>
=== modified file 'mail/wizard/mail_compose_message.py'
--- mail/wizard/mail_compose_message.py 2012-10-02 15:12:45 +0000
+++ mail/wizard/mail_compose_message.py 2012-10-05 07:32:26 +0000
@@ -121,7 +121,7 @@
'partner_ids': lambda self, cr, uid, ctx={}: [],
}
- def notify(self, cr, uid, newid, context=None):
+ def _notify(self, cr, uid, newid, context=None):
""" Override specific notify method of mail.message, because we do
not want that feature in the wizard. """
return
=== modified file 'note/note_view.xml'
--- note/note_view.xml 2012-09-30 14:16:38 +0000
+++ note/note_view.xml 2012-10-05 07:32:26 +0000
@@ -78,6 +78,7 @@
<!-- title -->
<field name="name"/>
</div>
+ <div class="oe_clear"></div>
<field name="tag_ids"/>
<div class="oe_right">
<t t-foreach="record.message_follower_ids.raw_value" t-as="follower">
=== modified file 'product/product_data.xml'
--- product/product_data.xml 2012-09-18 11:25:03 +0000
+++ product/product_data.xml 2012-10-05 07:32:26 +0000
@@ -40,7 +40,7 @@
<record id="product_uom_dozen" model="product.uom">
<field name="category_id" ref="product.product_uom_categ_unit"/>
<field name="name">Dozen</field>
- <field name="factor" eval="0.083"/>
+ <field name="factor_inv" eval="12"/>
<field name="uom_type">bigger</field>
</record>
<record id="product_uom_kgm" model="product.uom">
@@ -70,7 +70,7 @@
<!-- 'tonne' is the most common spelling in english-speaking countries,
the alternative is 'metric ton' in the US, abbreviated as 'mt' -->
<field name="name">t</field>
- <field name="factor" eval="0.001"/>
+ <field name="factor_inv" eval="1000"/>
<field name="uom_type">bigger</field>
</record>
<record id="product_uom_meter" model="product.uom">
@@ -81,7 +81,7 @@
<record id="product_uom_km" model="product.uom">
<field name="category_id" ref="uom_categ_length"/>
<field name="name">km</field>
- <field name="factor" eval="0.001"/>
+ <field name="factor_inv" eval="1000"/>
<field name="uom_type">bigger</field>
</record>
<record id="product_uom_cm" model="product.uom">
=== modified file 'project/project_data.xml'
--- project/project_data.xml 2012-10-02 20:40:23 +0000
+++ project/project_data.xml 2012-10-05 07:32:26 +0000
@@ -72,7 +72,7 @@
</record>
<record id="project_tt_deployment" model="project.task.type">
<field name="sequence">7</field>
- <field name="name">Deployment</field>
+ <field name="name">Done</field>
<field name="state">done</field>
<field name="case_default" eval="True"/>
</record>
=== modified file 'project_issue/project_issue.py'
--- project_issue/project_issue.py 2012-09-30 14:16:38 +0000
+++ project_issue/project_issue.py 2012-10-05 07:32:26 +0000
@@ -279,7 +279,7 @@
'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
'priority': crm.AVAILABLE_PRIORITIES[2][0],
- }
+ }
_group_by_full = {
'stage_id': _read_group_stage_ids
=== modified file 'project_timesheet/project_timesheet.py'
--- project_timesheet/project_timesheet.py 2012-10-02 10:29:15 +0000
+++ project_timesheet/project_timesheet.py 2012-10-05 07:32:26 +0000
@@ -28,6 +28,7 @@
class project_project(osv.osv):
_inherit = 'project.project'
+
def onchange_partner_id(self, cr, uid, ids, part=False, context=None):
res = super(project_project, self).onchange_partner_id(cr, uid, ids, part, context)
if part and res and ('value' in res):
@@ -68,6 +69,7 @@
'nodestroy': True,
'help': help
}
+
project_project()
class project_work(osv.osv):
@@ -81,7 +83,7 @@
user_name = self.pool.get('res.users').read(cr, uid, [user_id], ['name'])[0]['name']
raise osv.except_osv(_('Bad Configuration !'),
_('Please define employee for user "%s". You must create one.')% (user_name,))
- emp = self.pool.get('hr.employee').browse(cr, uid, emp_id[0])
+ emp = emp_obj.browse(cr, uid, emp_id[0])
if not emp.product_id:
raise osv.except_osv(_('Bad Configuration !'),
_('Please define product on the related employee.\nFill in the timesheet tab of the employee form.'))
@@ -90,44 +92,44 @@
raise osv.except_osv(_('Bad Configuration !'),
_('Please define journal on the related employee.\nFill in the timesheet tab of the employee form.'))
- a = emp.product_id.product_tmpl_id.property_account_expense.id
- if not a:
- a = emp.product_id.categ_id.property_account_expense_categ.id
- if not a:
+ acc_id = emp.product_id.product_tmpl_id.property_account_expense.id
+ if not acc_id:
+ acc_id = emp.product_id.categ_id.property_account_expense_categ.id
+ if not acc_id:
raise osv.except_osv(_('Bad Configuration !'),
_('Please define product and product category property account on the related employee.\nFill in the timesheet tab of the employee form.'))
+
res['product_id'] = emp.product_id.id
res['journal_id'] = emp.journal_id.id
- res['general_account_id'] = a
+ res['general_account_id'] = acc_id
res['product_uom_id'] = emp.product_id.uom_id.id
return res
def create(self, cr, uid, vals, *args, **kwargs):
- obj_timesheet = self.pool.get('hr.analytic.timesheet')
- project_obj = self.pool.get('project.project')
+ timesheet_obj = self.pool.get('hr.analytic.timesheet')
task_obj = self.pool.get('project.task')
uom_obj = self.pool.get('product.uom')
vals_line = {}
context = kwargs.get('context', {})
if not context.get('no_analytic_entry',False):
- obj_task = task_obj.browse(cr, uid, vals['task_id'])
+ task_obj = task_obj.browse(cr, uid, vals['task_id'])
result = self.get_user_related_details(cr, uid, vals.get('user_id', uid))
- vals_line['name'] = '%s: %s' % (tools.ustr(obj_task.name), tools.ustr(vals['name']) or '/')
+ vals_line['name'] = '%s: %s' % (tools.ustr(task_obj.name), tools.ustr(vals['name']) or '/')
vals_line['user_id'] = vals['user_id']
vals_line['product_id'] = result['product_id']
vals_line['date'] = vals['date'][:10]
- #calculate quantity based on employee's product's uom
+ # Calculate quantity based on employee's product's uom
vals_line['unit_amount'] = vals['hours']
default_uom = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id
if result['product_uom_id'] != default_uom:
vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id'])
- acc_id = obj_task.project_id and obj_task.project_id.analytic_account_id.id or False
+ acc_id = task_obj.project_id and task_obj.project_id.analytic_account_id.id or False
if acc_id:
vals_line['account_id'] = acc_id
- res = obj_timesheet.on_change_account_id(cr, uid, False, acc_id)
+ res = timesheet_obj.on_change_account_id(cr, uid, False, acc_id)
if res.get('value'):
vals_line.update(res['value'])
vals_line['general_account_id'] = result['general_account_id']
@@ -137,27 +139,29 @@
amount = vals_line['unit_amount']
prod_id = vals_line['product_id']
unit = False
- timeline_id = obj_timesheet.create(cr, uid, vals=vals_line, context=context)
+ timeline_id = timesheet_obj.create(cr, uid, vals=vals_line, context=context)
# Compute based on pricetype
- amount_unit = obj_timesheet.on_change_unit_amount(cr, uid, timeline_id,
+ amount_unit = timesheet_obj.on_change_unit_amount(cr, uid, timeline_id,
prod_id, amount, False, unit, vals_line['journal_id'], context=context)
if amount_unit and 'amount' in amount_unit.get('value',{}):
updv = { 'amount': amount_unit['value']['amount'] }
- obj_timesheet.write(cr, uid, [timeline_id], updv, context=context)
+ timesheet_obj.write(cr, uid, [timeline_id], updv, context=context)
vals['hr_analytic_timesheet_id'] = timeline_id
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
def write(self, cr, uid, ids, vals, context=None):
+ """
+ When a project task work gets updated, handle its hr analytic timesheet.
+ """
if context is None:
context = {}
timesheet_obj = self.pool.get('hr.analytic.timesheet')
- project_obj = self.pool.get('project.project')
uom_obj = self.pool.get('product.uom')
result = {}
if isinstance(ids, (long, int)):
- ids = [ids,]
+ ids = [ids]
for task in self.browse(cr, uid, ids, context=context):
line_id = task.hr_analytic_timesheet_id
@@ -165,25 +169,28 @@
# if a record is deleted from timesheet, the line_id will become
# null because of the foreign key on-delete=set null
continue
+
vals_line = {}
if 'name' in vals:
vals_line['name'] = '%s: %s' % (tools.ustr(task.task_id.name), tools.ustr(vals['name']) or '/')
if 'user_id' in vals:
vals_line['user_id'] = vals['user_id']
- result = self.get_user_related_details(cr, uid, vals.get('user_id', task.user_id.id))
- for fld in ('product_id', 'general_account_id', 'journal_id', 'product_uom_id'):
- if result.get(fld, False):
- vals_line[fld] = result[fld]
-
if 'date' in vals:
vals_line['date'] = vals['date'][:10]
if 'hours' in vals:
- default_uom = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id
vals_line['unit_amount'] = vals['hours']
prod_id = vals_line.get('product_id', line_id.product_id.id) # False may be set
- if result.get('product_uom_id',False) and (not result['product_uom_id'] == default_uom):
- vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id'])
+ # Put user related details in analytic timesheet values
+ details = self.get_user_related_details(cr, uid, vals.get('user_id', task.user_id.id))
+ for field in ('product_id', 'general_account_id', 'journal_id', 'product_uom_id'):
+ if details.get(field, False):
+ vals_line[field] = details[field]
+
+ # Check if user's default UOM differs from product's UOM
+ user_default_uom_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id
+ if details.get('product_uom_id', False) and details['product_uom_id'] != user_default_uom_id:
+ vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, user_default_uom_id, vals['hours'], details['product_uom_id'])
# Compute based on pricetype
amount_unit = timesheet_obj.on_change_unit_amount(cr, uid, line_id.id,
@@ -203,7 +210,7 @@
for task in self.browse(cr, uid, ids):
if task.hr_analytic_timesheet_id:
hat_ids.append(task.hr_analytic_timesheet_id.id)
-# delete entry from timesheet too while deleting entry to task.
+ # Delete entry from timesheet too while deleting entry to task.
if hat_ids:
hat_obj.unlink(cr, uid, hat_ids, *args, **kwargs)
return super(project_work,self).unlink(cr, uid, ids, *args, **kwargs)
@@ -231,12 +238,11 @@
if vals.get('project_id',False) or vals.get('name',False):
vals_line = {}
hr_anlytic_timesheet = self.pool.get('hr.analytic.timesheet')
- task_obj_l = self.browse(cr, uid, ids, context=context)
if vals.get('project_id',False):
project_obj = self.pool.get('project.project').browse(cr, uid, vals['project_id'], context=context)
acc_id = project_obj.analytic_account_id.id
- for task_obj in task_obj_l:
+ for task_obj in self.browse(cr, uid, ids, context=context):
if len(task_obj.work_ids):
for task_work in task_obj.work_ids:
if not task_work.hr_analytic_timesheet_id:
@@ -253,16 +259,19 @@
class res_partner(osv.osv):
_inherit = 'res.partner'
+
def unlink(self, cursor, user, ids, context=None):
parnter_id=self.pool.get('project.project').search(cursor, user, [('partner_id', 'in', ids)])
if parnter_id:
raise osv.except_osv(_('Invalid Action!'), _('You cannot delete a partner which is assigned to project, but you can uncheck the active box.'))
return super(res_partner,self).unlink(cursor, user, ids,
context=context)
+
res_partner()
class account_analytic_line(osv.osv):
_inherit = "account.analytic.line"
+
def on_change_account_id(self, cr, uid, ids, account_id):
res = {}
if not account_id:
@@ -274,5 +283,7 @@
if acc.state == 'close' or acc.state == 'cancelled':
raise osv.except_osv(_('Invalid Analytic Account !'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))
return res
+
account_analytic_line()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'sale_stock/report/sale_report_view.xml'
--- sale_stock/report/sale_report_view.xml 2012-07-26 20:56:59 +0000
+++ sale_stock/report/sale_report_view.xml 2012-10-05 07:32:26 +0000
@@ -5,7 +5,6 @@
<field name="name">sale.report.tree.sale.stock</field>
<field name="model">sale.report</field>
<field name="inherit_id" ref="sale.view_order_product_tree"/>
- <field name="type">tree</field>
<field name="arch" type="xml">
<field name="product_uom_qty" position="after">
<field name="shipped_qty_1" sum="Shipped"/>
@@ -13,4 +12,4 @@
</field>
</record>
</data>
-</openerp>
\ No newline at end of file
+</openerp>
=== modified file 'sale_stock/res_config_view.xml'
--- sale_stock/res_config_view.xml 2012-09-09 10:11:56 +0000
+++ sale_stock/res_config_view.xml 2012-10-05 07:32:26 +0000
@@ -5,7 +5,6 @@
<record id="view_sales_config_sale_stock" model="ir.ui.view">
<field name="name">sale settings</field>
<field name="model">sale.config.settings</field>
- <field name="type">form</field>
<field name="inherit_id" ref="sale.view_sales_config"/>
<field name="arch" type="xml">
<data>
@@ -72,4 +71,4 @@
</record>
</data>
-</openerp>
\ No newline at end of file
+</openerp>
=== modified file 'sale_stock/sale_stock_view.xml'
--- sale_stock/sale_stock_view.xml 2012-09-20 13:17:11 +0000
+++ sale_stock/sale_stock_view.xml 2012-10-05 07:32:26 +0000
@@ -18,7 +18,6 @@
<field name="name">sale.shop.sale.stock</field>
<field name="model">sale.shop</field>
<field name="inherit_id" ref="sale.view_shop_tree"/>
- <field name="type">tree</field>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="warehouse_id"/>
@@ -32,7 +31,6 @@
<field name="name">sale.order.form.sale.stock</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
- <field name="type">form</field>
<field name="arch" type="xml">
<data>
<xpath expr="//button[@name='invoice_corrected']" position="after">
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp