diff --git a/addons/.project b/addons/.project deleted file mode 100644 index 6b6fa8f2cfc..00000000000 --- a/addons/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - openobject-addons - - - - - - org.python.pydev.PyDevBuilder - - - - - - org.python.pydev.pythonNature - - diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 0c008c5db55..400d7967b67 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -125,8 +125,7 @@ - - + diff --git a/addons/delivery/sale.py b/addons/delivery/sale.py index 76498dc8cbd..c1bff9f8aa7 100644 --- a/addons/delivery/sale.py +++ b/addons/delivery/sale.py @@ -25,12 +25,8 @@ from osv import fields,osv # Overloaded sale_order to manage carriers : class sale_order(osv.osv): - _name = "sale.order" _inherit = 'sale.order' - _description = "Sale Order" - _columns = { - 'id': fields.integer('ID', readonly=True,invisible=True), 'carrier_id':fields.many2one("delivery.carrier","Delivery method", help="Complete this field if you plan to invoice the shipping based on packings made."), } diff --git a/addons/mrp_repair/report/order.rml b/addons/mrp_repair/report/order.rml index 6805496a5e8..223bcd38fbe 100644 --- a/addons/mrp_repair/report/order.rml +++ b/addons/mrp_repair/report/order.rml @@ -10,7 +10,7 @@ - + @@ -48,19 +48,28 @@ - + - - + + + + + + + + + + + + + + + - - - - @@ -68,81 +77,58 @@ - - - - - - - - - - - + - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + @@ -180,271 +166,234 @@ - [[ repeatIn(objects,'o') ]] - + [[ repeatIn(objects,'o') ]] + - Shipping address : - [[ o.partner_id.name ]] - [[ o.address_id.title or '' ]] [[ o.address_id.name ]] - [[ o.address_id.street ]] - [[ o.address_id.street2 or '' ]] - [[ o.address_id.city or '' ]] [[ o.address_id.zip or '' ]] - [[ o.address_id.state_id and o.address_id.state_id.name or '' ]] [[ o.address_id.country_id and o.address_id.country_id.name or '' ]] - + Shipping address : + [[ o.partner_id.name ]] + [[ o.address_id.title or '' ]] [[ o.address_id.name ]] + [[ o.address_id.street ]] + [[ o.address_id.street2 or '' ]] + [[ o.address_id.city or '' ]] [[ o.address_id.zip or '' ]] + [[ o.address_id.state_id and o.address_id.state_id.name or '' ]] [[ o.address_id.country_id and o.address_id.country_id.name or '' ]] + - Invoice address :[[ o.partner_id and o.partner_id.property_payment_term.name and removeParentNode('para')]] - [[ o.partner_invoice_id.street ]] [[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]] - [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]] + Invoice address :[[ o.partner_id and o.partner_id.property_payment_term.name ]] + [[ o.partner_invoice_id.street ]] [[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]] + [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]] - + - [[ o.partner_id.name ]] - [[ o.partner_id and adr_get(o.partner_id, 'default')['name'] ]] - [[ o.partner_id and adr_get(o.partner_id, 'default')['street'] ]] - [[ o.partner_id and adr_get(o.partner_id, 'default')['zip'] ]] [[ o.partner_id and adr_get(o.partner_id, 'default')['city'] ]] - [[ o.partner_id and adr_get(o.partner_id, 'default')['country_id'] and adr_get(o.partner_id, 'default')['country_id'][1] ]] + [[ o.partner_id.name ]] + [[ o.partner_id and adr_get(o.partner_id, 'default')['name'] ]] + [[ o.partner_id and adr_get(o.partner_id, 'default')['street'] ]] + [[ o.partner_id and adr_get(o.partner_id, 'default')['zip'] ]][[ o.partner_id and adr_get(o.partner_id, 'default')['city'] ]] + [[ o.partner_id and adr_get(o.partner_id, 'default')['country_id'] and adr_get(o.partner_id, 'default')['country_id'][1] ]] + + + + + + + + + + + + + + + - + [[ o.state<>'draft' and removeParentNode('para') ]]Repair Quotation N° : [[ o.name ]] + [[ o.state=='draft' and removeParentNode('para') ]]Repair Order N° : [[ o.name ]] + - [[ o.state<>'draft' and removeParentNode('para') ]]Repair Quotation N° : [[ o.name ]] - [[ o.state=='draft' and removeParentNode('para') ]]Repair Order N° : [[ o.name ]] - - - - + - Product to Repair + Product to Repair - Lot Number + Lot Number - Guarantee Limit + Guarantee Limit - Printing Date + Printing Date - [[ o.product_id.name or '' ]] + [[ o.product_id.name or '' ]] - [[ o.prodlot_id.name or '' ]] + [[ o.prodlot_id.name or ' ' ]] - [[ time.strftime('%d/%m/%Y', time.strptime(o.guarantee_limit, '%Y-%m-%d')) ]] + [[ time.strftime('%d/%m/%Y', time.strptime(o.guarantee_limit, '%Y-%m-%d')) ]] - [[ time.strftime('%d/%m/%Y') ]] + [[ time.strftime('%d/%m/%Y')]] - + - + - + - - Description + Description - VAT + VAT - Quantity + Quantity - Unit Price + Unit Price - Price + Price
- - - - Operation Line(s) - + + Operation Line(s) + - [[ repeatIn(o.operations,'line') ]] - - - - - [[ line.name ]] - - - [[ ', '.join(map(lambda x: x.name, line.tax_id)) or '0.00' ]] - - - [[ line.product_uom_qty or '0.00' ]] [[ line.product_uom.name ]] - - - [[ line.price_unit ]] - - - [[ line.price_subtotal ]] - - - - - - + [[ repeatIn(o.operations,'line') ]] Add [[ ((line.type == 'add') or removeParentNode('para')) and '' ]] + Remove [[ ((line.type == 'remove') or removeParentNode('para')) and '' ]] + + + [[ line.name ]] + + + [[ ','.join(map( lambda x: x.name, line.tax_id)) or '0.00' ]] + + + [[ line.product_uom_qty or '0.00' ]] [[ line.product_uom.name ]] + + + [[ line.price_unit ]] + + + [[ line.price_subtotal ]] - - -
- Fees Line(s) - - - - [[ repeatIn(o.fees_lines,'fees') ]] - - - - - [[ fees.name ]] - - - [[ ', '.join(map(lambda x: x.name, fees.tax_id)) or '0.00' ]] - - - [[ fees.product_uom_qty or '0.00' ]] [[ fees.product_uom.name ]] - - - [[ fees.price_unit ]] - - - [[ fees.price_subtotal ]] - - - - - - - - - - - - + Fees Line(s) - - - - - - - - - Net Total : - - - [[ o.amount_untaxed or '0.00' ]] - - - [[ o.pricelist_id.currency_id.name ]] - - + - - - + [[ repeatIn(o.fees_lines,'fees') ]] - Taxes : + [[ fees.name ]] - [[ o.amount_tax or '0.00' ]] + [[ ','.join(map( lambda x: x.name, fees.tax_id)) or '0.00' ]] - [[ o.pricelist_id.currency_id.name ]] + [[ fees.product_uom_qty or '0.00' ]] [[ fees.product_uom.name ]] + + + [[ fees.price_unit ]] + + + [[ fees.price_subtotal ]] - + + + + + + + + - - - + Net Total : - Total : + [[ o.amount_untaxed or '0.00' ]] - [[ total(o) ]] - - - [[ o.pricelist_id.currency_id.name ]] + [[ o.pricelist_id.currency_id.name ]] + + - - - + Taxes: - - - + [[ o.amount_tax or '0.00']] - - - + [[ o.pricelist_id.currency_id.name ]] + + + + + + + Total : - - - + [[ total(o) ]] + + + [[ o.pricelist_id.currency_id.name ]] - + + + + - [[ format(o.quotation_notes or '') ]] + [[ format(o.quotation_notes or '') ]] - +
- + \ No newline at end of file diff --git a/addons/project/project.py b/addons/project/project.py index b7ff8044707..c2337da7053 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -246,6 +246,15 @@ class task(osv.osv): #_sql_constraints = [ # ('remaining_hours', 'CHECK (remaining_hours>=0)', 'Please increase and review remaining hours ! It can not be smaller than 0.'), #] + + def _button_dummy(self, cr, uid, ids, context={}): + tot_work=0 + for obj in self.browse(cr,uid,ids): + for work in obj.work_ids: + tot_work+=work.hours + final_val = obj.planned_hours - tot_work + self.write(cr,uid,ids[0],{'remaining_hours':final_val}) + return True def copy(self, cr, uid, id, default={},context={}): default = default or {} @@ -408,23 +417,8 @@ class project_work(osv.osv): 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S') } _order = "date desc" - def create(self, cr, uid, vals, *args, **kwargs): - if 'task_id' in vals: - cr.execute('update project_task set remaining_hours=remaining_hours+%.2f where id=%d', (-vals.get('hours',0.0), vals['task_id'])) - return super(project_work,self).create(cr, uid, vals, *args, **kwargs) - def write(self, cr, uid, ids,vals,context={}): - for work in self.browse(cr, uid, ids, context): - cr.execute('update project_task set remaining_hours=remaining_hours+%.2f+(%.2f) where id=%d', (-vals.get('hours',0.0), work.hours, work.task_id.id)) - return super(project_work,self).write(cr, uid, ids, vals, context) - - def unlink(self, cr, uid, ids, *args, **kwargs): - for work in self.browse(cr, uid, ids): - cr.execute('update project_task set remaining_hours=remaining_hours+%.2f where id=%d', (work.hours, work.task_id.id)) - return super(project_work,self).unlink(cr, uid, ids,*args, **kwargs) project_work() - - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/project_demo.xml b/addons/project/project_demo.xml index 9a25d722689..ea6803bf302 100644 --- a/addons/project/project_demo.xml +++ b/addons/project/project_demo.xml @@ -89,7 +89,7 @@ Internal testing + Software Install - 2007-06-06 + 2008-06-06 17 diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 9b92f22c2cb..b2d31694d57 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -220,7 +220,8 @@ widget="float_time" on_change="onchange_planned(planned_hours,effective_hours)"/> - + +