[MERGE] trunk
bzr revid: rco@openerp.com-20111222162924-644yfj4213b6z7pk
This commit is contained in:
commit
a7bd2da414
|
@ -308,7 +308,7 @@ class account_bank_statement(osv.osv):
|
|||
|
||||
def balance_check(self, cr, uid, st_id, journal_type='bank', context=None):
|
||||
st = self.browse(cr, uid, st_id, context=context)
|
||||
if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001):
|
||||
if not ((abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001) or (abs((st.balance_end or 0.0) - st.balance_end_cash) < 0.0001)):
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The statement balance is incorrect !\nThe expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
|
||||
return True
|
||||
|
@ -358,7 +358,10 @@ class account_bank_statement(osv.osv):
|
|||
st_line_number = self.get_next_st_line_number(cr, uid, st_number, st_line, context)
|
||||
self.create_move_from_st_line(cr, uid, st_line.id, company_currency_id, st_line_number, context)
|
||||
|
||||
self.write(cr, uid, [st.id], {'name': st_number}, context=context)
|
||||
self.write(cr, uid, [st.id], {
|
||||
'name': st_number,
|
||||
'balance_end_real': st.balance_end
|
||||
}, context=context)
|
||||
self.log(cr, uid, st.id, _('Statement %s is confirmed, journal items are created.') % (st_number,))
|
||||
return self.write(cr, uid, ids, {'state':'confirm'}, context=context)
|
||||
|
||||
|
|
|
@ -477,7 +477,7 @@
|
|||
<separator string="Company" colspan="4"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="user_id" groups="base.group_extended"/>
|
||||
<field name="currency"/>
|
||||
<field name="currency" groups="base.group_extended"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" groups="base.group_extended">
|
||||
<separator string="Validations" colspan="4"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Analytic Balance.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Analytic Balance" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Analytic Balance" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="31.0" y1="30.0" width="531" height="779"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Analytic Journal" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Analytic Journal" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Cost Ledger.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Cost Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Cost Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="30.0" width="539" height="785"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Inverted Analytic Balance" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Inverted Analytic Balance" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Cost Ledger.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Cost Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Cost Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="30.0" y1="29.0" width="534" height="783"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Account Balance.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Account Balance" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Account Balance" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Centralized Journal.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Centralized Journal" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Centralized Journal" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="539" height="758"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Financial Report.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Financial Report" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Financial Report" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="General Journal.pdf">
|
||||
<template pageSize="(596.0,842.0)" title="General Journal" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="General Journal" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="540" height="758"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="General Ledger.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="General Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="General Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Journal.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Journal" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Journal" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Partner Balance.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Partner Balance" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Partner Balance" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Partner Ledger.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Partner Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Partner Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Partner Ledger.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Partner Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Partner Ledger" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Invoices.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Invoices" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Invoices" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="28.0" width="530" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Overdue Payments.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Overdue Payments" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Overdue Payments" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="42.0" y1="28.0" width="511" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Taxes.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Taxes" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Taxes" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="42.0" y1="62.0" width="511" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Crossovered Analytic" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Crossovered Analytic" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Analytic Budget.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Analytic Budget" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Analytic Budget" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="25.0" width="528" height="793"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Budgets.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Budgets" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Budgets" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Budget.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Budget" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Budget" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="33.0" width="535" height="778"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Account Followup.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Account Followup" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Account Followup" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="31.0" y1="28.0" width="532" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Invoices.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Invoices" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Invoices" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Invoices.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Invoices" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Invoices" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Payment Order.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Payment Order" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Payment Order" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="34.0" width="527" height="774"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Voucher.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Voucher" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Voucher" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Voucher.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Voucher" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Voucher" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="42.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Artists" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Artists" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Bids" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Bids" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Buyer" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Buyer" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Catelog" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Catelog" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Objects" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Objects" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Result" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Result" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Auction Total" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Auction Total" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Auction Total" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Auction Total" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Bids Lots" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Bids Lots" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Bids Phones Details" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Bids Phones Details" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Buyer Form" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Buyer Form" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Buyer List" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Buyer List" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Catelog With Picture" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Catelog With Picture" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="28.0" width="527" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Deposit Seller" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Deposit Seller" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Lots" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Lots" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Lots Inventory" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Lots Inventory" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Lots" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Lots" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Seller Form" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Seller Form" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -171,6 +171,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
`post_action`, in that order.
|
||||
"""
|
||||
def wrapper(cr, uid, vals, context=context):
|
||||
if context is None:
|
||||
context = {}
|
||||
new_id = old_create(cr, uid, vals, context=context)
|
||||
if not context.get('action'):
|
||||
self.post_action(cr, uid, [new_id], model, context=context)
|
||||
|
@ -183,6 +185,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
`post_action`, in that order.
|
||||
"""
|
||||
def wrapper(cr, uid, ids, vals, context=context):
|
||||
if context is None:
|
||||
context = {}
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
old_write(cr, uid, ids, vals, context=context)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Introspection report on objects" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Introspection report on objects" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="42.0" y1="42.0" width="511" height="758"/>
|
||||
<header>
|
||||
|
|
|
@ -154,7 +154,7 @@ class crm_case_categ(osv.osv):
|
|||
def _find_object_id(self, cr, uid, context=None):
|
||||
"""Finds id for case object"""
|
||||
object_id = context and context.get('object_id', False) or False
|
||||
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
|
||||
ids = self.pool.get('ir.model').search(cr, uid, [('id', '=', object_id)])
|
||||
return ids and ids[0] or False
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -68,7 +68,7 @@ class res_partner(osv.osv):
|
|||
'categ_id' : categ_ids and categ_ids[0] or '',
|
||||
'state' :'draft',
|
||||
'type': 'opportunity'
|
||||
})
|
||||
}, context=context)
|
||||
opportunity_ids[partner_id] = opportunity_id
|
||||
return opportunity_ids
|
||||
res_partner()
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
</field>
|
||||
<field name="meeting_ids" colspan="4" nolabel="1">
|
||||
<tree string="Meetings" colors="gray:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="name" string="Subject" />
|
||||
<field name="date" string="Start Date" />
|
||||
|
|
|
@ -58,6 +58,7 @@ class crm_partner2opportunity(osv.osv_memory):
|
|||
|
||||
def make_opportunity(self, cr, uid, ids, context=None):
|
||||
partner_ids = context and context.get('active_ids', []) or []
|
||||
partner_id = partner_ids[0] if partner_ids else None
|
||||
partner = self.pool.get('res.partner')
|
||||
lead = self.pool.get('crm.lead')
|
||||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
|
@ -65,6 +66,8 @@ class crm_partner2opportunity(osv.osv_memory):
|
|||
data.name,
|
||||
data.planned_revenue,
|
||||
data.probability,
|
||||
partner_id,
|
||||
context=context,
|
||||
)
|
||||
opportunity_id = opportunity_ids[partner_ids[0]]
|
||||
return lead.redirect_opportunity_view(cr, uid, opportunity_id, context=context)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Delivery Order.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Delivery Order" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Delivery Order" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="30.0" y1="27.0" width="508" height="815"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -50,6 +50,9 @@ technical OpenERP documentation at http://doc.openerp.com
|
|||
"css": [
|
||||
"static/src/css/edi.css"
|
||||
],
|
||||
'qweb': [
|
||||
"static/src/xml/*.xml",
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '002046536359186',
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
openerp.edi = function(openerp) {
|
||||
openerp.web.qweb.add_template("/edi/static/src/xml/edi.xml");
|
||||
openerp.web.qweb.add_template("/edi/static/src/xml/edi_account.xml");
|
||||
openerp.web.qweb.add_template("/edi/static/src/xml/edi_sale_purchase.xml");
|
||||
openerp.edi = {}
|
||||
|
||||
openerp.edi.EdiView = openerp.web.Widget.extend({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Attendance Errors.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Attendance Errors" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Attendance Errors" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="26.0" width="536" height="784"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -240,7 +240,7 @@ class hr_evaluation(osv.osv):
|
|||
request_obj = self.pool.get('hr.evaluation.interview')
|
||||
self.write(cr, uid, ids, {'state':'progress'}, context=context)
|
||||
for id in self.browse(cr, uid, ids, context=context):
|
||||
if len(id.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', id.id),('state', '=', 'done')], context=context)):
|
||||
if len(id.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', id.id),('state', 'in', ['done','cancel'])], context=context)):
|
||||
raise osv.except_osv(_('Warning !'),_("You cannot change state, because some appraisal in waiting answer or draft state"))
|
||||
return True
|
||||
|
||||
|
@ -250,6 +250,9 @@ class hr_evaluation(osv.osv):
|
|||
return True
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
interview_obj=self.pool.get('hr.evaluation.interview')
|
||||
evaluation = self.browse(cr, uid, ids[0], context)
|
||||
interview_obj.survey_req_cancel(cr, uid, [r.id for r in evaluation.survey_request_ids])
|
||||
self.write(cr, uid, ids,{'state':'cancel'}, context=context)
|
||||
return True
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Expenses" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Expenses" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="16.0" y1="57.0" width="522" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import datetime
|
||||
import datetime, time
|
||||
from itertools import groupby
|
||||
from operator import itemgetter
|
||||
|
||||
|
@ -396,8 +396,28 @@ class hr_employee(osv.osv):
|
|||
remaining[employee_id] = 0.0
|
||||
return remaining
|
||||
|
||||
def _get_leave_status(self, cr, uid, ids, name, args, context=None):
|
||||
holidays_id = self.pool.get('hr.holidays').search(cr, uid,
|
||||
[('employee_id', 'in', ids), ('date_from','<=',time.strftime('%Y-%m-%d %H:%M:%S')),
|
||||
('date_to','>=',time.strftime('%Y-%m-%d %H:%M:%S')),('type','=','remove')],
|
||||
context=context)
|
||||
result = {}
|
||||
for id in ids:
|
||||
result[id] = {
|
||||
'current_leave_state': False,
|
||||
'current_leave_id': False
|
||||
}
|
||||
for holiday in self.pool.get('hr.holidays').browse(cr, uid, holidays_id, context=context):
|
||||
result[holiday.employee_id.id]['current_leave_state'] = holiday.state
|
||||
result[holiday.employee_id.id]['current_leave_id'] = holiday.holiday_status_id.id
|
||||
return result
|
||||
|
||||
_columns = {
|
||||
'remaining_leaves': fields.function(_get_remaining_days, string='Remaining Legal Leaves', fnct_inv=_set_remaining_days, type="float", help='Total number of legal leaves allocated to this employee, change this value to create allocation/leave requests.'),
|
||||
'current_leave_state': fields.function(_get_leave_status, multi="leave_status", string="Current Leave Status", type="selection",
|
||||
selection=[('draft', 'New'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
|
||||
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')]),
|
||||
'current_leave_id': fields.function(_get_leave_status, multi="leave_status", string="Current Leave Type",type='many2one', relation='hr.holidays.status')
|
||||
}
|
||||
|
||||
hr_employee()
|
||||
|
|
|
@ -492,7 +492,9 @@
|
|||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="coach_id" position="after">
|
||||
<field name="remaining_leaves" string="Remaining Legal Leaves" readonly="1"/>
|
||||
<field name="remaining_leaves"/>
|
||||
<field name="current_leave_id"/>
|
||||
<field name="current_leave_state"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<template title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<template title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<template title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Invoice rate by user" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Invoice rate by user" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="35.0" y1="57.0" width="525" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Cost Ledger" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Cost Ledger" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Bilan" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Bilan" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="20.0" width="481" height="802"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Compte de resultat" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Compte de resultat" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="20.0" width="481" height="802"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Lunch Order.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Lunch Order" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Lunch Order" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="42.0" width="527" height="758"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="CRM Lead.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="CRM Lead" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="CRM Lead" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="BOM Structure.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="BOM Structure" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="BOM Structure" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="31.0" y1="30.0" width="532" height="781"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Production Order.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Production Order" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Production Order" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="34.0" y1="42.0" width="527" height="758"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -54,6 +54,9 @@
|
|||
Now I check workcenter lines.
|
||||
-
|
||||
!python {model: mrp.production}: |
|
||||
from tools import float_compare
|
||||
def assert_equals(value1, value2, msg, float_compare=float_compare):
|
||||
assert float_compare(value1, value2, precision_digits=2) == 0, msg
|
||||
order = self.browse(cr, uid, ref("mrp_production_shelf100cm"), context=context)
|
||||
assert len(order.workcenter_lines), "Workcenter lines are not generated proper."
|
||||
for line in order.workcenter_lines:
|
||||
|
@ -63,25 +66,20 @@
|
|||
d, m = divmod(factor, wc.capacity_per_cycle)
|
||||
cycle = (d + (m and 1.0 or 0.0))
|
||||
if line.name == "Short time assembly - Assembly Section":
|
||||
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
|
||||
assert line.cycle == (4*cycle), "Cycle is not correspond: %s" % (line.name)
|
||||
assert line.hour == (2*cycle*4 + hours), "Hours is not correspond: %s"% (line.name)
|
||||
assert_equals(line.cycle, (4*cycle), "Computed cycles mismatch: %s" % (line.name))
|
||||
assert_equals(line.hour, (2*cycle*4 + hours), "Computed hours mismatch: %s"% (line.name))
|
||||
elif line.name == "Short time assembly - Rear Panel SHE100":
|
||||
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
|
||||
assert line.cycle == (1*cycle), "Cycle is not correspond: %s" % (line.name)
|
||||
assert line.hour == (2*cycle + hours), "Hours is not correspond: %s"% (line.name)
|
||||
assert_equals(line.cycle, (1*cycle), "Computed cycles mismatch: %s" % (line.name))
|
||||
assert_equals(line.hour, (2*cycle + hours), "Computed hours mismatch: %s"% (line.name))
|
||||
elif line.name == "long time assembly - Shelf of 100cm":
|
||||
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
|
||||
assert line.cycle == (2*cycle), "Cycle is not correspond: %s" % (line.name)
|
||||
assert line.hour == (5*cycle + hours), "Hours is not correspond: %s"% (line.name)
|
||||
assert_equals(line.cycle, (2*cycle), "Computed cycles mismatch: %s" % (line.name))
|
||||
assert_equals(line.hour, (5*cycle + hours), "Computed hours mismatch: %s"% (line.name))
|
||||
elif line.name == "Testing - Shelf of 100cm":
|
||||
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
|
||||
assert line.cycle == (1*cycle), "Cycle is not correspond: %s" % (line.name)
|
||||
assert line.hour == (1*cycle + hours), "Hours is not correspond: %s"% (line.name)
|
||||
assert_equals(line.cycle, (1*cycle), "Computed cycles mismatch: %s" % (line.name))
|
||||
assert_equals(line.hour, (1*cycle + hours), "Computed hours mismatch: %s"% (line.name))
|
||||
elif line.name == "Packing - Shelf of 100cm":
|
||||
assert line.sequence, "Sequence is not correspond: %s" % (line.name)
|
||||
assert line.cycle == (1*cycle), "Cycle is not correspond: %s" % (line.name)
|
||||
assert line.hour == (0.5*cycle + hours), "Hours is not correspond: %s"% (line.name)
|
||||
assert_equals(line.cycle, (1*cycle), "Computed cycles mismatch: %s" % (line.name))
|
||||
assert_equals(line.hour, (0.5*cycle + hours), "Computed hours mismatch: %s"% (line.name))
|
||||
else:
|
||||
raise AssertionError('unknown workcenter line: %s' % line)
|
||||
-
|
||||
|
|
|
@ -48,8 +48,12 @@ The aim is to have a complete module to manage all products repairs. The followi
|
|||
'mrp_repair_workflow.xml',
|
||||
'mrp_repair_report.xml',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'test': ['test/test_mrp_repair.yml', 'test/mrp_repair_report.yml','test/mrp_repair_cancel.yml'],
|
||||
'demo_xml': ['mrp_repair_demo.yml'],
|
||||
'test': ['test/test_mrp_repair_noneinv.yml',
|
||||
'test/test_mrp_repair_b4inv.yml',
|
||||
'test/test_mrp_repair_afterinv.yml',
|
||||
'test/test_mrp_repair_cancel.yml',
|
||||
'test/mrp_repair_report.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0060814381277',
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
-
|
||||
!record {model: stock.move, id: stock_move_pcbasicpc0}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC1] Basic PC'
|
||||
product_id: product.product_product_pc1
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rmrp1}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'none'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock_move_pcbasicpc0'
|
||||
name: RMA00004
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD1] HDD Seagate 7200.8 80GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD1 Seagate repair fees'
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc1
|
||||
-
|
||||
!record {model: stock.move, id: stock.stock_move_stockmvmrp1}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC3] Medium PC'
|
||||
product_id: product.product_product_pc3
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rmrp0}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'after_repair'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock.stock_move_stockmvmrp1'
|
||||
name: RMA-00007
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD2] HDD Seagate 7200.8 120GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd2
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD2 Seagate repair fees'
|
||||
product_id: product.product_product_hdd2
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc3
|
||||
-
|
||||
!record {model: stock.move, id: stock.stock_move_stockmvmrp2}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC4] Customizable PC'
|
||||
product_id: product.product_product_pc4
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rmrp2}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'b4repair'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock.stock_move_stockmvmrp2'
|
||||
name: RMA-00011
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD3] HDD Seagate 7200.8 160GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd3
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD3 Seagate repair fees'
|
||||
product_id: product.product_product_hdd3
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc4
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Repair" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Repair" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="15.0" y1="42.0" width="539" height="758"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
-
|
||||
In order to test repair orders I have created stock move line record.
|
||||
-
|
||||
!record {model: stock.move, id: stock_move_pcbasicpc0}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC1] Basic PC'
|
||||
product_id: product.product_product_pc1
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
|
||||
-
|
||||
I start by creating new Repair order for "Basic PC" product and Invoice Method is "No Invoice".
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rma2}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'none'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock_move_pcbasicpc0'
|
||||
name: RMA000055
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD1] HDD Seagate 7200.8 80GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD1 Seagate repair fees'
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc1
|
||||
-
|
||||
I confirm this Repair order.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma2}
|
||||
-
|
||||
I Cancel this Repair order.
|
||||
-
|
||||
!python {model: mrp.repair.cancel}: |
|
||||
context = {"lang": 'en_US', "active_model":"mrp.repair", "active_ids": [ref("mrp_repair_rma2")], "tz": False, "active_id":ref('mrp_repair_rma2')}
|
||||
self.fields_view_get(cr, uid, False, "form", context)
|
||||
self.cancel_repair(cr, uid, [ref("mrp_repair_rma2")], context=context)
|
||||
-
|
||||
I check that Repair order is in "Cancel" state.
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rma2}:
|
||||
- state == 'cancel'
|
||||
-
|
||||
I Reopen the repair order as new.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.action_cancel_draft(cr, uid, [ref('mrp_repair_rma2')])
|
||||
-
|
||||
I change the Invoice method of the repair order to Before repair.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.write(cr, uid, [ref('mrp_repair_rma2')], {'invoice_method': 'b4repair'})
|
||||
-
|
||||
I confirm the Repair order again.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma2}
|
||||
-
|
||||
Repair order state to 'Ready'.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.action_repair_ready(cr, uid, [ref('mrp_repair_rma2')], context=None)
|
||||
-
|
||||
I click on "Create Invoice" button of this wizard to make invoice.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_invoice_create, ref: mrp_repair_rma2}
|
||||
-
|
||||
I check that Invoice is created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma2')], context=context)[0]
|
||||
assert repair_id.invoice_id.id, _("No invoice exists for this repair order.")
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_start, ref: mrp_repair_rma2}
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button For Invoice Type b4repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rma2}
|
||||
|
|
@ -3,6 +3,6 @@
|
|||
-
|
||||
!python {model: mrp.repair}: |
|
||||
import netsvc, tools, os
|
||||
(data, format) = netsvc.LocalService('report.repair.order').create(cr, uid, [ref('mrp_repair.mrp_repair_rma0')], {}, {})
|
||||
(data, format) = netsvc.LocalService('report.repair.order').create(cr, uid, [ref('mrp_repair.mrp_repair_rmrp0')], {}, {})
|
||||
if tools.config['test_report_directory']:
|
||||
file(os.path.join(tools.config['test_report_directory'], 'mrp_repair-order_report.'+format), 'wb+').write(data)
|
||||
|
|
|
@ -1,118 +0,0 @@
|
|||
-
|
||||
In order to test "mrp_repair" module, I start with creating repair order, confirm it, and start repair.
|
||||
-
|
||||
Given that I have already stock move line created.
|
||||
-
|
||||
!record {model: stock.move, id: stock_move_pcbasicpc0}:
|
||||
company_id: base.main_company
|
||||
date: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
date_expected: !eval datetime.today().strftime("%Y-%m-%d %H:%M:%S")
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[PC1] Basic PC'
|
||||
product_id: product.product_product_pc1
|
||||
product_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
product_uos_qty: 1.0
|
||||
|
||||
-
|
||||
I start by creating new Repair order for "Basic PC" product.
|
||||
-
|
||||
!record {model: mrp.repair, id: mrp_repair_rma0}:
|
||||
address_id: base.res_partner_address_1
|
||||
guarantee_limit: !eval datetime.today().strftime("%Y-%m-%d")
|
||||
invoice_method: 'after_repair'
|
||||
partner_invoice_id: base.res_partner_address_1
|
||||
location_dest_id: stock.stock_location_14
|
||||
location_id: stock.stock_location_14
|
||||
move_id: 'stock_move_pcbasicpc0'
|
||||
name: RMA00004
|
||||
operations:
|
||||
- location_dest_id: stock.location_production
|
||||
location_id: stock.stock_location_stock
|
||||
name: '[HDD1] HDD Seagate 7200.8 80GB'
|
||||
price_unit: 50.0
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom: product.product_uom_unit
|
||||
product_uom_qty: 1.0
|
||||
state: draft
|
||||
to_invoice: 1
|
||||
type: add
|
||||
fees_lines:
|
||||
- name: 'HDD1 Seagate repair fees'
|
||||
product_id: product.product_product_hdd1
|
||||
product_uom_qty: 1.0
|
||||
product_uom: product.product_uom_unit
|
||||
price_unit: 50.0
|
||||
partner_id: base.res_partner_9
|
||||
product_id: product.product_product_pc1
|
||||
-
|
||||
On change of product sets some values
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.onchange_product_id(cr, uid, [ref('mrp_repair_rma0')], product_id=False)
|
||||
-
|
||||
On change of move id sets values of guarantee limit, source location, destination location, partner and partner address.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
|
||||
self.onchange_move_id(cr, uid, [ref('mrp_repair_rma0')], False, repair_id.move_id)
|
||||
-
|
||||
On change of operation type it sets source location, destination location and to invoice field
|
||||
-
|
||||
!python {model: mrp.repair.line}: |
|
||||
self.onchange_operation_type(cr, uid, [ref('mrp_repair_rma0')], type, False, ref('base.main_company'), {})
|
||||
-
|
||||
On change of partner sets the values of partner address, partner invoice address and pricelist.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
|
||||
self.onchange_partner_id(cr, uid, [ref('mrp_repair_rma0')], False, repair_id.address_id)
|
||||
-
|
||||
On change of production lot sets the values of source location, destination location, move and guarantee limit
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
|
||||
self.onchange_lot_id(cr, uid, [ref('mrp_repair_rma0')], False, repair_id.product_id)
|
||||
-
|
||||
I check that Repair order is in "Draft" state.
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rma0}:
|
||||
- state == 'draft'
|
||||
-
|
||||
I confirm This Repair order.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rma0}
|
||||
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button For Invoice Type After repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rma0}
|
||||
|
||||
-
|
||||
I check that state is "Under Repair".
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rma0}:
|
||||
- state == 'under_repair'
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rma0}
|
||||
|
||||
-
|
||||
I select invoiced after repair option in this "RMA00004" Repair order.
|
||||
so I create Invoice by click on "Make Invoice" wizard.
|
||||
-
|
||||
!record {model: mrp.repair.make_invoice, id: mrp_repair_make_invoice_0}:
|
||||
group: 1
|
||||
-
|
||||
I click on "Create Invoice" button of this wizard to make invoice.
|
||||
-
|
||||
!python {model: mrp.repair.make_invoice}: |
|
||||
self.make_invoices(cr, uid, [ref("mrp_repair_make_invoice_0")], {"active_ids": [ref("mrp_repair.mrp_repair_rma0")]})
|
||||
-
|
||||
I check that Invoice is created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0]
|
||||
assert repair_id.invoice_id.id, _("No invoice exists for this repair order")
|
|
@ -0,0 +1,36 @@
|
|||
-
|
||||
In order to test invoice type after repair.
|
||||
-
|
||||
I Confirm Repair order For Invoice Type After repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp0}
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button For Invoice Type After repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp0}
|
||||
-
|
||||
I check that state is "Under Repair".
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rmrp0}:
|
||||
- state == 'under_repair'
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp0}
|
||||
-
|
||||
I define invoiced after repair option in this Repair order.
|
||||
so I create Invoice by click on "Make Invoice" wizard.
|
||||
-
|
||||
!record {model: mrp.repair.make_invoice, id: mrp_repair_make_invoice_0}:
|
||||
group: 1
|
||||
-
|
||||
I click on "Create Invoice" button of this wizard to make invoice.
|
||||
-
|
||||
!python {model: mrp.repair.make_invoice}: |
|
||||
self.make_invoices(cr, uid, [ref("mrp_repair_make_invoice_0")], {"active_ids": [ref("mrp_repair.mrp_repair_rmrp0")]})
|
||||
-
|
||||
I check that Invoice is created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp0')], context=context)[0]
|
||||
assert repair_id.invoice_id.id, _("No invoice exists for this repair order")
|
|
@ -0,0 +1,29 @@
|
|||
-
|
||||
Now test invoice type before repair.
|
||||
-
|
||||
I Confirm Repair order For Invoice Type Before Repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp2}
|
||||
-
|
||||
Repair order state to 'Ready'.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
self.action_repair_ready(cr, uid, [ref('mrp_repair_rmrp2')], context=None)
|
||||
-
|
||||
I click on "Create Invoice" button of this wizard to make invoice.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_invoice_create, ref: mrp_repair_rmrp2}
|
||||
-
|
||||
I check that Invoice is created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp2')], context=context)[0]
|
||||
assert repair_id.invoice_id.id, _("No invoice exists for this repair order.")
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_start, ref: mrp_repair_rmrp2}
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button For Invoice Type before repair.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp2}
|
|
@ -0,0 +1,28 @@
|
|||
-
|
||||
In order to test the cancel flow of mrp_repair module,
|
||||
I start by creating new copy Repair order for "Basic PC" product.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
copy_id = self.copy(cr, uid, ref("mrp_repair_rmrp1"))
|
||||
context.update({'new_id':copy_id})
|
||||
-
|
||||
I Cancel this Repair order.
|
||||
-
|
||||
!python {model: mrp.repair.cancel}: |
|
||||
new_id = context.get('new_id')
|
||||
context.update({"active_model":"mrp.repair", "active_ids": [new_id],"active_id": new_id})
|
||||
self.fields_view_get(cr, uid, False, "form", context)
|
||||
self.cancel_repair(cr, uid, [new_id], context)
|
||||
-
|
||||
I check that Repair order is in "Cancel" state.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
new_id = context.get('new_id')
|
||||
order = self.browse(cr, uid, [new_id])[0]
|
||||
assert order.state == 'cancel',"Repair order should be in Cancel state."
|
||||
-
|
||||
I Reopen the repair order as new.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
new_id = context.get('new_id')
|
||||
self.action_cancel_draft(cr, uid, [new_id])
|
|
@ -0,0 +1,27 @@
|
|||
-
|
||||
In order to test "mrp_repair" module, I start from confirm it, and start repair.
|
||||
-
|
||||
I Confirm Repair order for Invoice Type 'None'.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_confirm, ref: mrp_repair_rmrp1}
|
||||
-
|
||||
I start the repairing process by click on "Start Repair" Button For Invoice Type None.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp1}
|
||||
-
|
||||
I check that state is "Under Repair".
|
||||
-
|
||||
!assert {model: mrp.repair, id: mrp_repair_rmrp1}:
|
||||
- state == 'under_repair'
|
||||
-
|
||||
Repairing Process for product is Done and I End Repair process by click on "End Repair" button.
|
||||
-
|
||||
!workflow {model: mrp.repair, action: action_repair_end, ref: mrp_repair_rmrp1}
|
||||
-
|
||||
I define invoiced none option in this Repair order.
|
||||
So, I check that Invoice should not be created for this repair order.
|
||||
-
|
||||
!python {model: mrp.repair}: |
|
||||
repair_id = self.browse(cr, uid, [ref('mrp_repair_rmrp1')], context=context)[0]
|
||||
assert not repair_id.invoice_id.id, _("Invoice should not be exists for this repair order")
|
||||
|
|
@ -453,12 +453,9 @@ class pos_order(osv.osv):
|
|||
|
||||
# Search for the income account
|
||||
if line.product_id.property_account_income.id:
|
||||
income_account = line.\
|
||||
product_id.property_account_income.id
|
||||
elif line.product_id.categ_id.\
|
||||
property_account_income_categ.id:
|
||||
income_account = line.product_id.categ_id.\
|
||||
property_account_income_categ.id
|
||||
income_account = line.product_id.property_account_income.id
|
||||
elif line.product_id.categ_id.property_account_income_categ.id:
|
||||
income_account = line.product_id.categ_id.property_account_income_categ.id
|
||||
else:
|
||||
raise osv.except_osv(_('Error !'), _('There is no income '\
|
||||
'account defined for this product: "%s" (id:%d)') \
|
||||
|
|
|
@ -64,6 +64,20 @@
|
|||
<field name="partner_id" ref="base.res_partner_agrolait"/>
|
||||
<field name="product_id" ref="product.product_product_pc1"/>
|
||||
</record>
|
||||
<record id="stock_picking_out0" model="stock.picking">
|
||||
<field name="origin">POS/019</field>
|
||||
<field name="date_done" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="1" name="auto_picking"/>
|
||||
<field name="move_type">direct</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="note">POS notes </field>
|
||||
<field name="state">done</field>
|
||||
<field name="type">out</field>
|
||||
<field name="min_date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="invoice_state">none</field>
|
||||
<field name="max_date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
</record>
|
||||
<record id="pos_order_pos11" model="pos.order">
|
||||
<field name="sale_journal" ref="account.sales_journal"/>
|
||||
<field name="shop_id" ref="sale.shop"/>
|
||||
|
@ -76,7 +90,7 @@
|
|||
<field name="pricelist_id" ref="product.list0"/>
|
||||
<field name="name">POS/019</field>
|
||||
<field model="account.invoice" name="invoice_id" search="[('name', '=', u'Invoice from POS: POS/019')]"/>
|
||||
<field model="stock.picking" name="picking_id" search="[('name', '=', u'OUT/00019')]"/>
|
||||
<field name="picking_id" ref="stock_picking_out0"/>
|
||||
</record>
|
||||
<record id="account_bank_statement_0" model="account.bank.statement">
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
|
@ -102,21 +116,6 @@
|
|||
|
||||
</record>
|
||||
|
||||
<record id="stock_picking_out0" model="stock.picking">
|
||||
<field name="origin">POS/019</field>
|
||||
<field name="date_done" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field eval="1" name="auto_picking"/>
|
||||
<field name="move_type">direct</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="note">POS notes </field>
|
||||
<field name="state">done</field>
|
||||
<field name="type">out</field>
|
||||
<field name="min_date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
<field name="name">OUT/00019</field>
|
||||
<field name="invoice_state">none</field>
|
||||
<field name="max_date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/>
|
||||
</record>
|
||||
<record id="stock_move_stockmovepos0" model="stock.move">
|
||||
<field name="origin">POS/019</field>
|
||||
<field eval="1.0" name="product_uos_qty"/>
|
||||
|
@ -135,7 +134,7 @@
|
|||
<field eval="[(6,0,[])]" name="move_history_ids2"/>
|
||||
<field name="product_id" ref="product.product_product_pc1"/>
|
||||
<field name="location_dest_id" ref="stock.stock_location_customers"/>
|
||||
<field model="stock.picking" name="picking_id" search="[('name', '=', u'OUT/00019')]"/>
|
||||
<field name="picking_id" ref="stock_picking_out0"/>
|
||||
</record>
|
||||
<record id="pos_order_line_orderline0" model="pos.order.line">
|
||||
<field name="notice">No Discount</field>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Statement" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Statement" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="36.0" y1="57.0" width="520" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Cashbox of the day" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Cashbox of the day" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="27.0" y1="57.0" width="512" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Details of Sales" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Details of Sales" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="57.0" width="511" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Details of Sales" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Details of Sales" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="57.0" width="511" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Sale Lines.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Sale Lines" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Sale Lines" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="27.0" y1="57.0" width="512" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Payment" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Payment" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="2.0" y1="57.0" width="537" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Payment By User" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Payment By User" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Sales Report" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Sales Report" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="27.0" y1="57.0" width="512" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Todays Sales By User" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Todays Sales By User" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="27.0" y1="57.0" width="512" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="User's Product'" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="User's Product'" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="36.0" y1="57.0" width="520" height="728"/>
|
||||
</pageTemplate>
|
||||
|
|
|
@ -615,6 +615,8 @@ openerp.point_of_sale = function(db) {
|
|||
this.$element.find('button').click(_.bind(this.performPayment, this));
|
||||
},
|
||||
performPayment: function(event) {
|
||||
if (this.shop.get('selectedOrder').get('step') === 'receipt')
|
||||
return;
|
||||
var cashRegister, cashRegisterCollection, cashRegisterId;
|
||||
/* set correct view */
|
||||
this.shop.get('selectedOrder').set({'step': 'payment'});
|
||||
|
|
|
@ -100,7 +100,8 @@ class pos_box_entries(osv.osv_memory):
|
|||
if not statement_id:
|
||||
raise osv.except_osv(_('Error !'), _('You have to open at least one cashbox'))
|
||||
|
||||
acc_id = product_obj.browse(cr, uid, int(data['product_id'])).property_account_income
|
||||
product = product_obj.browse(cr, uid, int(data['product_id']))
|
||||
acc_id = product.property_account_income or product.categ_id.property_account_income_categ
|
||||
if not acc_id:
|
||||
raise osv.except_osv(_('Error !'), _('Please check that income account is set to %s')%(product_obj.browse(cr, uid, data['product_id']).name))
|
||||
if statement_id:
|
||||
|
|
|
@ -82,7 +82,7 @@ class pos_box_out(osv.osv_memory):
|
|||
stat_done = statement_obj.browse(cr, uid, done_statmt, context=context)
|
||||
am = 0.0
|
||||
product = product_obj.browse(cr, uid, data['product_id'], context=context)
|
||||
acc_id = product.property_account_income or product.categ_id.property_account_income_categ
|
||||
acc_id = product.property_account_expense or product.categ_id.property_account_expense_categ
|
||||
if not acc_id:
|
||||
raise osv.except_osv(_('Error !'), _('please check that account is set to %s')%(product.name))
|
||||
if not statement_ids:
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</group>
|
||||
<newline/>
|
||||
<group expand='0' string='Group by...' groups="base.group_extended">
|
||||
<filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}" />
|
||||
<filter string='Category' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'categ_id'}" groups="base.group_extended"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string='Default UOM' icon="terp-mrp" domain="[]" context="{'group_by' : 'uom_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="Price List.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Price List" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<template title="Price List" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="28.0" y1="28.0" width="539" height="786"/>
|
||||
</pageTemplate>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue