diff options
| author | Purnendu Singh (OpenERP) <psi@tinyerp.com> | 2012-04-19 14:37:08 +0530 |
|---|---|---|
| committer | Purnendu Singh (OpenERP) <psi@tinyerp.com> | 2012-04-19 14:37:08 +0530 |
| commit | 2a6a022d032bc3ebd52d93d2b9db8da8e3165bf2 (patch) | |
| tree | 92ce9833bf9a119741a94cb6c7ea8c080aec4083 | |
| parent | 6dbbf9e79d16f83d46087b50466c34827823e582 (diff) | |
[IMP] remove conflicts
bzr revid: psi@tinyerp.com-20120419090708-ezvbeb00093ojkrt
| -rw-r--r-- | addons/account/account_invoice_view.xml | 9 | ||||
| -rw-r--r-- | addons/hr_holidays/hr_holidays_view.xml | 14 | ||||
| -rw-r--r-- | addons/sale/sale.py | 94 | ||||
| -rw-r--r-- | addons/sale/sale_view.xml | 67 |
4 files changed, 21 insertions, 163 deletions
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 88af88ac4e1..ac0fd9de962 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -303,18 +303,11 @@ <button name="action_invoice_sent" type="object" string="Send By Email" icon="terp-mail-message-new" states="open"/> <button name="invoice_print" string="Print Invoice" type="object" icon="gtk-print" states="open"/> <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/> - <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_account_user"/> + <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_proforma_invoices"/> <button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='sent,paid' icon="gtk-execute"/> <button name="invoice_cancel" states="draft,proforma2,sale,open,sent" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/> <button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/> <button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','<>','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/> -<<<<<<< TREE -======= - <button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/> - <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_proforma_invoices"/> - <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/> - <button name="%(account_invoices)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/> ->>>>>>> MERGE-SOURCE </group> </group> </page> diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index b0db225df25..3006f50302e 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -87,17 +87,10 @@ <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/> <separator string="Reasons" colspan="4"/> <field name="notes" nolabel="1" colspan="4"/> -<<<<<<< TREE <newline/> <field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}' colspan="2"/> <group colspan="2" col="6"> <button string="Submit to Manager" name="confirm" states="draft" type="workflow" icon="gtk-yes"/> -======= - <group colspan="4" col="8"> - <field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/> - <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/> - <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/> ->>>>>>> MERGE-SOURCE <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/> <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/> <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user,base.group_hr_manager"/> @@ -138,17 +131,10 @@ <field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/> <separator string="Reasons" colspan="4"/> <field name="notes" nolabel="1" colspan="4"/> -<<<<<<< TREE <newline/> <field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}' colspan="2"/> <group colspan="2" col="6"> <button string="Submit to Manager" name="confirm" states="draft" type="workflow" icon="gtk-yes"/> -======= - <group colspan="4" col="8"> - <field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/> - <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user"/> - <button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/> ->>>>>>> MERGE-SOURCE <button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/> <button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply" groups="base.group_hr_user"/> <button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no" groups="base.group_hr_user"/> diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 43209ad4bcf..71846387f65 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1473,98 +1473,6 @@ class sale_order_line(osv.osv): sale_order_line() -<<<<<<< TREE -class sale_config_picking_policy(osv.osv_memory): - _name = 'sale.config.picking_policy' - _inherit = 'res.config' - - _columns = { - 'name': fields.char('Name', size=64), - 'sale_orders': fields.boolean('Based on Sales Orders',), - 'deli_orders': fields.boolean('Based on Delivery Orders'), - 'task_work': fields.boolean('Based on Tasks\' Work'), - 'timesheet': fields.boolean('Based on Timesheet'), - 'order_policy': fields.selection([ - ('manual', 'Invoice Based on Sales Orders'), - ('picking', 'Invoice Based on Deliveries'), - ], 'Main Method Based On', required=True, help="You can generate invoices based on sales orders or based on shippings."), - 'charge_delivery': fields.boolean('Do you charge the delivery?'), - 'time_unit': fields.many2one('product.uom','Main Working Time Unit') - } - _defaults = { - 'order_policy': 'manual', - 'time_unit': lambda self, cr, uid, c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Hour'))], context=c) and self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Hour'))], context=c)[0] or False, - } - - def onchange_order(self, cr, uid, ids, sale, deli, context=None): - res = {} - if sale: - res.update({'order_policy': 'manual'}) - elif deli: - res.update({'order_policy': 'picking'}) - return {'value':res} - - def execute(self, cr, uid, ids, context=None): - ir_values_obj = self.pool.get('ir.values') - data_obj = self.pool.get('ir.model.data') - menu_obj = self.pool.get('ir.ui.menu') - module_obj = self.pool.get('ir.module.module') - module_upgrade_obj = self.pool.get('base.module.upgrade') - module_name = [] - - group_id = data_obj.get_object(cr, uid, 'base', 'group_sale_salesman').id - - wizard = self.browse(cr, uid, ids)[0] - - if wizard.sale_orders: - menu_id = data_obj.get_object(cr, uid, 'sale', 'menu_invoicing_sales_order_lines').id - menu_obj.write(cr, uid, menu_id, {'groups_id':[(4,group_id)]}) - - if wizard.deli_orders: - menu_id = data_obj.get_object(cr, uid, 'sale', 'menu_action_picking_list_to_invoice').id - menu_obj.write(cr, uid, menu_id, {'groups_id':[(4,group_id)]}) - - if wizard.task_work: - module_name.append('project_timesheet') - module_name.append('project_mrp') - module_name.append('account_analytic_analysis') - - if wizard.timesheet: - module_name.append('account_analytic_analysis') - - if wizard.charge_delivery: - module_name.append('delivery') - - if len(module_name): - module_ids = [] - need_install = False - module_ids = [] - for module in module_name: - data_id = module_obj.name_search(cr, uid , module, [], '=') - module_ids.append(data_id[0][0]) - - for module in module_obj.browse(cr, uid, module_ids): - if module.state == 'uninstalled': - module_obj.state_update(cr, uid, [module.id], 'to install', ['uninstalled'], context) - need_install = True - cr.commit() - if need_install: - pooler.restart_pool(cr.dbname, update_module=True)[1] - - if wizard.time_unit: - prod_id = data_obj.get_object(cr, uid, 'product', 'product_consultant').id - product_obj = self.pool.get('product.product') - product_obj.write(cr, uid, prod_id, {'uom_id':wizard.time_unit.id, 'uom_po_id': wizard.time_unit.id}) - - ir_values_obj.set(cr, uid, 'default', False, 'order_policy', ['sale.order'], wizard.order_policy) - if wizard.task_work and wizard.time_unit: - company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id - self.pool.get('res.company').write(cr, uid, [company_id], { - 'project_time_mode_id': wizard.time_unit.id - }, context=context) - -sale_config_picking_policy() - class mail_message(osv.osv): _name = 'mail.message' _inherit = 'mail.message' @@ -1577,6 +1485,4 @@ class mail_message(osv.osv): mail_message() -======= ->>>>>>> MERGE-SOURCE # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 5c8db74b15d..025d27e48b1 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -97,22 +97,27 @@ <field name="type">form</field> <field name="arch" type="xml"> <form layout="manual"> - <div class="oe_form_topbar"> - <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-go-forward"/> - <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" icon="gtk-apply"/> - <button name="ship_recreate" states="shipping_except" string="Recreate Packing" icon="gtk-ok"/> - <button name="ship_corrected" states="shipping_except" string="Ignore Exception" icon="gtk-apply"/> - <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/> - <button name="%(report_sale_order)d" string="Print Order" type="action" icon="gtk-print" states="waiting_date,manual,progress,done,shipping_except,invoice_except"/> - <button name="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object"/> - <button name="ship_cancel" states="shipping_except" string="Cancel Order" icon="gtk-cancel"/> - <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/> - <button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/> - <button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/> - <button name="%(report_sale_order)d" string="Print Quotation" type="action" icon="gtk-print" states="draft"/> - <button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply"/> + <div class="oe_form_topbar"> + <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-go-forward"/> + <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" icon="gtk-apply"/> + <button name="ship_recreate" states="shipping_except" string="Recreate Delivery Order" icon="gtk-ok"/> + <button name="ship_corrected" states="shipping_except" string="Ignore Exception" icon="gtk-apply"/> + <button name="action_quotation_sent" string="Send" type="object" icon="terp-mail-message-new" states="draft"/> + <button name="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object"/> + <button name="action_cancel_draft" states="sent,cancel" string="Set to Draft" type="object" icon="gtk-convert"/> + <button name="print_quotation" string="Print Quotation" type="object" icon="gtk-print" states="draft"/> + <button name="order_confirm" states="draft,sent" string="Confirm Order" icon="gtk-apply"/> + <button name="action_view_invoice" string="Open Invoice" icon="gtk-go-forward" type="object" + attrs="{'invisible': ['|','|','|',('state', '!=','progress'), ('invoiced', '=', True),('order_policy','=','picking'), + '&','&',('order_policy','=','postpaid'),('state', '=','progress'),('shipped','=',False)]}"/> + <button name="action_view_delivery" string="Open Delivery Order" icon="gtk-go-forward" type="object" + attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}"/> + <button name="cancel" states="draft,sent" string="Cancel Order" icon="gtk-cancel"/> + <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/> + <button name="ship_cancel" states="shipping_except" string="Cancel Order" icon="gtk-cancel"/> + <button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/> <div class="oe_right"> - <field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,progress,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/> + <field name="state" widget="statusbar" statusbar_visible="draft,sent,progress,invoiced,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/> </div> </div> <sheet string="Sales Order" layout="auto"> @@ -206,37 +211,6 @@ <field name="price_subtotal" groups="base.group_sale_notes_subtotal"/> </tree> </field> -<<<<<<< TREE - <newline/> - <group col="13" colspan="10"> - <field name="amount_untaxed" sum="Untaxed amount"/> - <field name="amount_tax"/> - <field name="amount_total"/> - <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/> - <button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" icon="gtk-execute" states="draft,manual" groups="base.group_extended"/> - </group> - <group col="17" colspan="4"> - <field name="state" widget="statusbar" statusbar_visible="draft,sent,progress,invoiced,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/> - <button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-go-forward"/> - <button name="invoice_corrected" states="invoice_except" string="Ignore Exception" icon="gtk-apply"/> - <button name="ship_recreate" states="shipping_except" string="Recreate Delivery Order" icon="gtk-ok"/> - <button name="ship_corrected" states="shipping_except" string="Ignore Exception" icon="gtk-apply"/> - <button name="action_quotation_sent" string="Send" type="object" icon="terp-mail-message-new" states="draft"/> - <button name="manual_invoice" states="manual" string="Create Final Invoice" icon="gtk-go-forward" type="object"/> - <button name="action_cancel_draft" states="sent,cancel" string="Set to Draft" type="object" icon="gtk-convert"/> - <button name="print_quotation" string="Print Quotation" type="object" icon="gtk-print" states="draft"/> - <button name="order_confirm" states="draft,sent" string="Confirm Order" icon="gtk-apply"/> - <button name="action_view_invoice" string="Open Invoice" icon="gtk-go-forward" type="object" - attrs="{'invisible': ['|','|','|',('state', '!=','progress'), ('invoiced', '=', True),('order_policy','=','picking'), - '&','&',('order_policy','=','postpaid'),('state', '=','progress'),('shipped','=',False)]}"/> - <button name="action_view_delivery" string="Open Delivery Order" icon="gtk-go-forward" type="object" - attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}"/> - <button name="cancel" states="draft,sent" string="Cancel Order" icon="gtk-cancel"/> - <button name="action_cancel" states="manual,progress" string="Cancel Order" type="object" icon="gtk-cancel"/> - <button name="ship_cancel" states="shipping_except" string="Cancel Order" icon="gtk-cancel"/> - <button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/> - </group> -======= <div class="oe_right"> <group col="2"> @@ -249,7 +223,6 @@ <separator colspan="4" string="Notes"/> <field colspan="4" name="note" nolabel="1"/> ->>>>>>> MERGE-SOURCE </page> <page string="Other Information"> <group colspan="2" col="2" groups="base.group_extended" name="logistics"> |
