diff options
| author | Mustufa Rangwala <mra@mra-laptop> | 2011-01-17 14:25:25 +0530 |
|---|---|---|
| committer | Mustufa Rangwala <mra@mra-laptop> | 2011-01-17 14:25:25 +0530 |
| commit | 82f3e851037a2e86b0c8318d778738b629a2cdba (patch) | |
| tree | e49b0b59a442538fff8189c8f0250d8e077721a2 | |
| parent | 9fe22ea6ba0a0d587e7191c0ccbaecf1f85c4441 (diff) | |
| parent | 7c95acb04ce4cdad92fc045ef54e0c06b8921537 (diff) | |
[MERGE] merge frm trunk addons
bzr revid: mra@mra-laptop-20110117085525-fyp0stkl1g8gi6kx
| -rw-r--r-- | addons/crm/crm_meeting.py | 2 | ||||
| -rw-r--r-- | addons/mail_gateway/mail_gateway.py | 6 | ||||
| -rw-r--r-- | addons/mrp/product.py | 9 | ||||
| -rw-r--r-- | addons/point_of_sale/point_of_sale.py | 9 | ||||
| -rw-r--r-- | addons/project/project.py | 3 | ||||
| -rw-r--r-- | addons/purchase/purchase.py | 4 | ||||
| -rw-r--r-- | addons/purchase/wizard/purchase_line_invoice.py | 2 | ||||
| -rw-r--r-- | addons/sale/sale.py | 2 | ||||
| -rw-r--r-- | addons/stock/stock.py | 2 | ||||
| -rw-r--r-- | addons/stock/stock_incoterms.xml | 9 | ||||
| -rw-r--r-- | addons/stock/stock_view.xml | 2 |
11 files changed, 40 insertions, 10 deletions
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py index cbc12cec248..2c4edc02df7 100644 --- a/addons/crm/crm_meeting.py +++ b/addons/crm/crm_meeting.py @@ -146,7 +146,7 @@ class res_users(osv.osv): 'user_id': user_id}, context=context) except: # Tolerate a missing shortcut. See product/product.py for similar code. - logging.getLogger('orm').warning('Skipped Products shortcut for user "%s"', data.get('name','<new')) + logging.getLogger('orm').debug('Skipped meetings shortcut for user "%s"', data.get('name','<new')) return user_id diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py index ed5489fda79..15c5bba7c64 100644 --- a/addons/mail_gateway/mail_gateway.py +++ b/addons/mail_gateway/mail_gateway.py @@ -25,6 +25,7 @@ import tools import binascii import email from email.header import decode_header +from email.utils import parsedate import base64 import re from tools.translate import _ @@ -111,6 +112,11 @@ class mailgate_thread(osv.osv): if attach is None: attach = [] + if email_date: + edate = parsedate(email_date) + if edate is not None: + email_date = time.strftime('%Y-%m-%d %H:%M:%S', edate) + # The mailgate sends the ids of the cases and not the object list if all(isinstance(case_id, (int, long)) for case_id in cases): diff --git a/addons/mrp/product.py b/addons/mrp/product.py index bb9bc27625f..7301527f68e 100644 --- a/addons/mrp/product.py +++ b/addons/mrp/product.py @@ -90,4 +90,13 @@ class product_product(osv.osv): for bom in bom_obj.browse(cr, uid, bom_ids, context=context): _compute_price(bom) + def copy(self, cr, uid, id, default=None, context=None): + if not default: + default = {} + default.update({ + 'bom_ids': [] + }) + return super(product_product, self).copy(cr, uid, id, default, context=context) + + product_product() diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index f359b8208d7..bdff54cd147 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -299,8 +299,11 @@ class pos_order(osv.osv): @param name: Names of fields. @return: pricelist ID """ - pricelist = self.pool.get('product.pricelist').search(cr, uid, [('name', '=', 'Public Pricelist')], context=context) - return pricelist and pricelist[0] or False + res = self.pool.get('sale.shop').search(cr, uid, [], context=context) + if res: + shop = self.pool.get('sale.shop').browse(cr, uid, res[0], context=context) + return shop.pricelist_id and shop.pricelist_id.id or False + return False def _journal_default(self, cr, uid, context=None): """ To get default pricelist for the order @@ -1246,4 +1249,4 @@ class stock_picking(osv.osv): stock_picking() -# 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/project/project.py b/addons/project/project.py index b2dedfd2e36..eb09586ba2c 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -126,7 +126,8 @@ class project(osv.osv): 'priority': fields.integer('Sequence', help="Gives the sequence order when displaying the list of projects"), 'warn_manager': fields.boolean('Warn Manager', help="If you check this field, the project manager will receive a request each time a task is completed by his team.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), - 'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members', help="Project's member. Not used in any computation, just for information purpose, but a user has to be member of a project to add a the to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), + 'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members', + help="Project's members are users who can have an access to the tasks related to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'tasks': fields.one2many('project.task', 'project_id', "Project tasks"), 'planned_hours': fields.function(_progress_rate, multi="progress", method=True, string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.", store = { diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index b0e8b9a6c62..d2c0c0238e4 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -363,7 +363,7 @@ class purchase_order(osv.osv): _('There is no purchase journal defined for this company: "%s" (id:%d)') % (o.company_id.name, o.company_id.id)) inv = { 'name': o.partner_ref or o.name, - 'reference': "P%dPO%d" % (o.partner_id.id, o.id), + 'reference': o.partner_ref or o.name, 'account_id': a, 'type': 'in_invoice', 'partner_id': o.partner_id.id, @@ -440,7 +440,7 @@ class purchase_order(osv.osv): if order_line.product_id.product_tmpl_id.type in ('product', 'consu'): dest = order.location_id.id move = self.pool.get('stock.move').create(cr, uid, { - 'name': 'PO:'+order_line.name, + 'name': order.name + ': ' +(order_line.name or ''), 'product_id': order_line.product_id.id, 'product_qty': order_line.product_qty, 'product_uos_qty': order_line.product_qty, diff --git a/addons/purchase/wizard/purchase_line_invoice.py b/addons/purchase/wizard/purchase_line_invoice.py index 3ff0ee53b6e..200778b6d70 100644 --- a/addons/purchase/wizard/purchase_line_invoice.py +++ b/addons/purchase/wizard/purchase_line_invoice.py @@ -158,7 +158,7 @@ class purchase_line_invoice(osv.osv_memory): 'view_mode': 'tree,form', 'res_model': 'account.invoice', 'view_id': False, - 'context': "{'type':'in_invoice'}", + 'context': "{'type':'in_invoice', 'journal_type': 'purchase'}", 'type': 'ir.actions.act_window' } purchase_line_invoice() diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 3ed49f44b74..cd9ae88292e 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -403,7 +403,7 @@ class sale_order(osv.osv): 'name': order.client_order_ref or '', 'origin': order.name, 'type': 'out_invoice', - 'reference': "P%dSO%d" % (order.partner_id.id, order.id), + 'reference': order.client_order_ref or order.name, 'account_id': a, 'partner_id': order.partner_id.id, 'journal_id': journal_ids[0], diff --git a/addons/stock/stock.py b/addons/stock/stock.py index ee21ce83a75..31a30d233cf 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -272,7 +272,7 @@ class stock_location(osv.osv): context['compute_child'] = False if not product_ids: - product_ids = product_obj.search(cr, uid, []) + product_ids = product_obj.search(cr, uid, [], context={'active_test': False}) products = product_obj.browse(cr, uid, product_ids, context=context) products_by_uom = {} diff --git a/addons/stock/stock_incoterms.xml b/addons/stock/stock_incoterms.xml index 371b61055ba..fb9082161ba 100644 --- a/addons/stock/stock_incoterms.xml +++ b/addons/stock/stock_incoterms.xml @@ -49,5 +49,14 @@ <field name="code">DDU</field> <field name="name">DELIVERED DUTY UNPAID</field> </record> + <record id="incoterm_DAT" model="stock.incoterms"> + <field name="code">DAT</field> + <field name="name">Delivered At Terminal</field> + </record> + <record id="incoterm_DAP" model="stock.incoterms"> + <field name="code">DAP</field> + <field name="name">Delivered At Place</field> + </record> + </data> </openerp> diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 4c7c6e56442..80e63ebef23 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1779,6 +1779,8 @@ <field name="view_mode">tree,form</field> </record> + <menuitem action="action_incoterms_tree" id="menu_action_incoterm_open" parent="menu_warehouse_config" sequence="7"/> + <act_window context="{'location': active_id}" domain="[('type','<>','service')]" |
