[MERGE] merged with openobject-addons
bzr revid: hmo@tinyerp.com-20100927104630-gexwg3tudfq3gly8
This commit is contained in:
commit
a9e8c8fd17
|
@ -54,6 +54,17 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="currency_id" widget="selection"/>
|
||||
<field name="general_account_id" widget="selection"/>
|
||||
<field name="product_uom_id" widget="selection"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="account_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Currency" icon="terp-dolar" context="{'group_by':'currency_id'}"/>
|
||||
|
@ -70,17 +81,6 @@
|
|||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="currency_id" widget="selection"/>
|
||||
<field name="general_account_id" widget="selection"/>
|
||||
<field name="product_uom_id" widget="selection"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="account_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<group colspan="10" col="12">
|
||||
<filter icon="terp-go-year" string="This F.Year"
|
||||
name="thisyear"
|
||||
domain="[('period_id','in','current_year')]"
|
||||
domain="[('period_id','in','current_year')]"
|
||||
help="Journal Entries with period in current year"/>
|
||||
<filter icon="terp-go-month" string="This Period"
|
||||
name="period"
|
||||
|
@ -73,6 +73,19 @@
|
|||
<field name="journal_id" widget="selection"/>
|
||||
<field name="period_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="fiscalyear_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="product_id"/>
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical" groups="base.group_multi_company"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="date_created"/>
|
||||
<field name="date"/>
|
||||
<field name="date_maturity"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
|
||||
|
@ -92,19 +105,6 @@
|
|||
<filter string="Period" icon="terp-go-month" name="group_period" context="{'group_by':'period_id'}"/>
|
||||
<filter string="Fiscal Year" icon="terp-go-year" context="{'group_by':'fiscalyear_id'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="fiscalyear_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="product_id"/>
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical" groups="base.group_multi_company"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="date_created"/>
|
||||
<field name="date"/>
|
||||
<field name="date_maturity"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -97,6 +97,17 @@
|
|||
<field name="categ_id" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="product_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="account_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date_due"/>
|
||||
<separator orientation="vertical" groups="base.group_multi_company"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id','residual_visible':True}"/>
|
||||
<filter string="Salesman" name='user' icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
|
@ -118,17 +129,6 @@
|
|||
<filter string="Month" name="month" icon="terp-go-month" context="{'group_by':'month'}" help="Group by month of Invoice Date"/>
|
||||
<filter string="Year" name="year" icon="terp-go-year" context="{'group_by':'year'}" help="Group by year of Invoice Date"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="product_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="account_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date_due"/>
|
||||
<separator orientation="vertical" groups="base.group_multi_company"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -126,8 +126,8 @@ class account_analytic_account(osv.osv):
|
|||
where account_analytic_line.account_id IN %s \
|
||||
and account_analytic_line.invoice_id is not null \
|
||||
GROUP BY account_analytic_line.account_id",(parent_ids,))
|
||||
for account_id, sum in cr.fetchall():
|
||||
res[account_id] = sum
|
||||
for account_id, lid in cr.fetchall():
|
||||
res[account_id][f] = lid
|
||||
for account in accounts:
|
||||
for child in account.child_ids:
|
||||
if res[account.id][f] < res.get(child.id, {}).get(f, ''):
|
||||
|
@ -141,8 +141,8 @@ class account_analytic_account(osv.osv):
|
|||
where account_id IN %s \
|
||||
and invoice_id is null \
|
||||
GROUP BY account_analytic_line.account_id" ,(parent_ids,))
|
||||
for account_id, sum in cr.fetchall():
|
||||
res[account_id][f] = sum
|
||||
for account_id, lwd in cr.fetchall():
|
||||
res[account_id][f] = lwd
|
||||
for account in accounts:
|
||||
for child in account.child_ids:
|
||||
if res[account.id][f] < res.get(child.id, {}).get(f, ''):
|
||||
|
@ -160,8 +160,8 @@ class account_analytic_account(osv.osv):
|
|||
and invoice_id is null \
|
||||
AND to_invoice IS NOT NULL \
|
||||
GROUP BY account_analytic_line.account_id;",(parent_ids,))
|
||||
for account_id, sum in cr.fetchall():
|
||||
res[account_id][f] = round(sum, dp)
|
||||
for account_id, sua in cr.fetchall():
|
||||
res[account_id][f] = round(sua, dp)
|
||||
for account in accounts:
|
||||
for child in account.child_ids:
|
||||
if account.id != child.id:
|
||||
|
@ -180,8 +180,8 @@ class account_analytic_account(osv.osv):
|
|||
and account_analytic_journal.type='general' \
|
||||
GROUP BY account_analytic_line.account_id",(parent_ids,))
|
||||
ff = cr.fetchall()
|
||||
for account_id, sum in ff:
|
||||
res[account_id][f] = round(sum, dp)
|
||||
for account_id, hq in ff:
|
||||
res[account_id][f] = round(hq, dp)
|
||||
for account in accounts:
|
||||
for child in account.child_ids:
|
||||
if account.id != child.id:
|
||||
|
|
|
@ -18,15 +18,10 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from mx import DateTime
|
||||
from osv import fields, osv, orm
|
||||
from tools import config
|
||||
from tools.translate import _
|
||||
import ir
|
||||
import netsvc
|
||||
import os
|
||||
import time
|
||||
import tools
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Auction Artists
|
||||
|
@ -37,7 +32,7 @@ class auction_artists(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Artist/Author Name', size=64, required=True),
|
||||
'pseudo': fields.char('Pseudo', size=64),
|
||||
'birth_death_dates':fields.char('Birth / Death dates', size=64),
|
||||
'birth_death_dates':fields.char('Lifespan', size=64),
|
||||
'biography': fields.text('Biography'),
|
||||
}
|
||||
auction_artists()
|
||||
|
@ -69,23 +64,45 @@ class auction_dates(osv.osv):
|
|||
reads = self.read(cr, uid, ids, ['name', 'auction1'], context)
|
||||
name = [(r['id'], '['+r['auction1']+'] '+ r['name']) for r in reads]
|
||||
return name
|
||||
|
||||
def _get_invoice(self, cr, uid, ids, name, arg, context={}):
|
||||
lots_obj = self.pool.get('auction.lots')
|
||||
result = {}
|
||||
for data in self.browse(cr, uid, ids):
|
||||
buyer_inv_ids = []
|
||||
seller_inv_ids = []
|
||||
result[data.id] = {
|
||||
'seller_invoice_history': buyer_inv_ids,
|
||||
'buyer_invoice_history': seller_inv_ids,
|
||||
}
|
||||
lots_ids = lots_obj.search(cr, uid, [('auction_id','=',data.id)])
|
||||
for lot in lots_obj.browse(cr, uid, lots_ids):
|
||||
if lot.ach_inv_id:
|
||||
buyer_inv_ids.append(lot.ach_inv_id.id)
|
||||
if lot.sel_inv_id:
|
||||
seller_inv_ids.append(lot.sel_inv_id.id)
|
||||
result[data.id]['seller_invoice_history'] = seller_inv_ids
|
||||
result[data.id]['buyer_invoice_history'] = buyer_inv_ids
|
||||
return result
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Auction Name', size=64, required=True),
|
||||
'expo1': fields.date('First Exposition Day', required=True, help="Beginning Exposition Date For Auction"),
|
||||
'expo2': fields.date('Last Exposition Day', required=True, help="Last Exposition Date For Auction"),
|
||||
'auction1': fields.date('First Auction Day', required=True, help="Start Date Of Auction"),
|
||||
'auction2': fields.date('Last Auction Day', required=True, help="End Date Of Auction"),
|
||||
'journal_id': fields.many2one('account.journal', 'Buyer Journal', required=True, help="Account Journal For Buyer"),
|
||||
'journal_seller_id': fields.many2one('account.journal', 'Seller Journal', required=True, help="Account Journal For Seller"),
|
||||
'buyer_costs': fields.many2many('account.tax', 'auction_buyer_taxes_rel', 'auction_id', 'tax_id', 'Buyer Costs', help="Account Tax For Buyer"),
|
||||
'seller_costs': fields.many2many('account.tax', 'auction_seller_taxes_rel', 'auction_id', 'tax_id', 'Seller Costs', help="Account Tax For Seller"),
|
||||
'expo1': fields.date('First Exposition Day', required=True, help="Beginning exposition date for auction"),
|
||||
'expo2': fields.date('Last Exposition Day', required=True, help="Last exposition date for auction"),
|
||||
'auction1': fields.date('First Auction Day', required=True, help="Start date of auction"),
|
||||
'auction2': fields.date('Last Auction Day', required=True, help="End date of auction"),
|
||||
'journal_id': fields.many2one('account.journal', 'Buyer Journal', required=True, help="Account journal for buyer"),
|
||||
'journal_seller_id': fields.many2one('account.journal', 'Seller Journal', required=True, help="Account journal for seller"),
|
||||
'buyer_costs': fields.many2many('account.tax', 'auction_buyer_taxes_rel', 'auction_id', 'tax_id', 'Buyer Costs', help="Account tax for buyer"),
|
||||
'seller_costs': fields.many2many('account.tax', 'auction_seller_taxes_rel', 'auction_id', 'tax_id', 'Seller Costs', help="Account tax for seller"),
|
||||
'acc_income': fields.many2one('account.account', 'Income Account', required=True),
|
||||
'acc_expense': fields.many2one('account.account', 'Expense Account', required=True),
|
||||
'adj_total': fields.function(_adjudication_get, method=True, string='Total Adjudication', store=True),
|
||||
'state': fields.selection((('draft', 'Draft'), ('closed', 'Closed')), 'State', select=1, readonly=True,
|
||||
help='When auction starts the state is \'Draft\'.\n At the end of auction, the state becomes \'Closed\'.'),
|
||||
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True),
|
||||
'buyer_invoice_history': fields.function(_get_invoice, relation='account.invoice', method=True, string="Buyer Invoice", type='many2many', multi=True),
|
||||
'seller_invoice_history': fields.function(_get_invoice, relation='account.invoice', method=True, string="Seller Invoice", type='many2many', multi=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
@ -107,9 +124,9 @@ class auction_dates(osv.osv):
|
|||
context={}
|
||||
lots_obj = self.pool.get('auction.lots')
|
||||
lots_ids = lots_obj.search(cr, uid, [('auction_id', 'in', ids), ('state', '=', 'draft'), ('obj_price', '>', 0)])
|
||||
new_buyer_invoice = lots_obj.lots_invoice(cr, uid, lots_ids, {}, None)
|
||||
lots_obj.lots_invoice(cr, uid, lots_ids, {}, None)
|
||||
lots_ids2 = lots_obj.search(cr, uid, [('auction_id', 'in', ids), ('obj_price', '>', 0)])
|
||||
new_seller_invoice = lots_obj.seller_trans_create(cr, uid, lots_ids2, {})
|
||||
lots_obj.seller_trans_create(cr, uid, lots_ids2, {})
|
||||
self.write(cr, uid, ids, {'state': 'closed'}) #close the auction
|
||||
return True
|
||||
|
||||
|
@ -262,7 +279,6 @@ class auction_lots(osv.osv):
|
|||
lots = self.browse(cr, uid, ids, context)
|
||||
pt_tax = self.pool.get('account.tax')
|
||||
for lot in lots:
|
||||
total_tax = 0.0
|
||||
taxes = []
|
||||
for name in fields:
|
||||
res[lot.id] = {name: False}
|
||||
|
@ -323,7 +339,6 @@ class auction_lots(osv.osv):
|
|||
('account_id', '=', lot.auction_id.account_analytic_id.id),
|
||||
('journal_id', '<>', lot.auction_id.journal_id.id),
|
||||
('journal_id', '<>', lot.auction_id.journal_seller_id.id)])
|
||||
indir_cost = lot.bord_vnd_id.specific_cost_ids
|
||||
for r in lot.bord_vnd_id.specific_cost_ids:
|
||||
som += r.amount
|
||||
for line in account_analytic_line_obj.browse(cr, uid, line_ids, context=context):
|
||||
|
@ -355,15 +370,15 @@ class auction_lots(osv.osv):
|
|||
|
||||
_columns = {
|
||||
'bid_lines':fields.one2many('auction.bid_line', 'lot_id', 'Bids'),
|
||||
'auction_id': fields.many2one('auction.dates', 'Auction', select=1, help="Auction For Object"),
|
||||
'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True, help="Provide Deposit Information: seller, Withdrawned Method, Object, Deposit Costs"),
|
||||
'name': fields.char('Title', size=64, required=True, help='Auction Object Name'),
|
||||
'auction_id': fields.many2one('auction.dates', 'Auction', select=1, help="Auction for object"),
|
||||
'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True, help="Provide deposit information: seller, Withdrawned Method, Object, Deposit Costs"),
|
||||
'name': fields.char('Title', size=64, required=True, help='Auction object name'),
|
||||
'name2': fields.char('Short Description (2)', size=64),
|
||||
'lot_type': fields.selection(_type_get, 'Object category', size=64),
|
||||
'author_right': fields.many2one('account.tax', 'Author rights', help="Account Tax For Author Commission"),
|
||||
'author_right': fields.many2one('account.tax', 'Author rights', help="Account tax for author commission"),
|
||||
'lot_est1': fields.float('Minimum Estimation', help="Minimum Estimate Price"),
|
||||
'lot_est2': fields.float('Maximum Estimation', help="Maximum Estimate Price"),
|
||||
'lot_num': fields.integer('List Number', required=True, select=1, help="List Number In Depositer Inventory"),
|
||||
'lot_num': fields.integer('List Number', required=True, select=1, help="List number in depositer inventory"),
|
||||
'create_uid': fields.many2one('res.users', 'Created by', readonly=True),
|
||||
'history_ids':fields.one2many('auction.lot.history', 'lot_id', 'Auction history'),
|
||||
'lot_local':fields.char('Location', size=64, help="Auction Location"),
|
||||
|
@ -380,15 +395,15 @@ class auction_lots(osv.osv):
|
|||
'ach_login': fields.char('Buyer Username', size=64),
|
||||
'ach_uid': fields.many2one('res.partner', 'Buyer'),
|
||||
'seller_id': fields.related('bord_vnd_id','partner_id', type='many2one', relation='res.partner', string='Seller', readonly=True),
|
||||
'ach_emp': fields.boolean('Taken Away', readonly=True, help="When state is Taken Away, This field is Marked as True"),
|
||||
'is_ok': fields.boolean('Buyer\'s payment', help="When Buyer Pay For Bank statement', This field is Marked"),
|
||||
'ach_emp': fields.boolean('Taken Away', readonly=True, help="When state is Taken Away, this field is marked as True"),
|
||||
'is_ok': fields.boolean('Buyer\'s payment', help="When buyer pay for bank statement', this field is marked"),
|
||||
'ach_inv_id': fields.many2one('account.invoice', 'Buyer Invoice', readonly=True, states={'draft':[('readonly', False)]}),
|
||||
'sel_inv_id': fields.many2one('account.invoice', 'Seller Invoice', readonly=True, states={'draft':[('readonly', False)]}),
|
||||
'vnd_lim': fields.float('Seller limit'),
|
||||
'vnd_lim_net': fields.boolean('Net limit ?', readonly=True),
|
||||
'image': fields.binary('Image', help="Object Image"),
|
||||
'paid_vnd':fields.function(_getprice, string='Seller Paid', method=True, type='boolean', store=True, multi="paid_vnd", help="When state of Seller Invoice is 'Paid', This field is selected as True."),
|
||||
'paid_ach':fields.function(_getprice, string='Buyer Invoice Reconciled', method=True, type='boolean', store=True, multi="paid_ach", help="When state of Buyer Invoice is 'Paid', This field is selected as True."),
|
||||
'paid_vnd':fields.function(_getprice, string='Seller Paid', method=True, type='boolean', store=True, multi="paid_vnd", help="When state of Seller Invoice is 'Paid', this field is selected as True."),
|
||||
'paid_ach':fields.function(_getprice, string='Buyer Invoice Reconciled', method=True, type='boolean', store=True, multi="paid_ach", help="When state of Buyer Invoice is 'Paid', this field is selected as True."),
|
||||
'state': fields.selection((
|
||||
('draft', 'Draft'),
|
||||
('unsold', 'Unsold'),
|
||||
|
@ -404,7 +419,7 @@ class auction_lots(osv.osv):
|
|||
'gross_revenue':fields.function(_getprice, method=True, string='Gross revenue', store=True, multi="gross_revenue", help="Buyer Price - Seller Price"),
|
||||
'gross_margin':fields.function(_getprice, method=True, string='Gross Margin (%)', store=True, multi="gross_margin", help="(Gross Revenue*100.0)/ Object Price"),
|
||||
'costs':fields.function(_getprice, method=True, string='Indirect costs', store=True, multi="costs", help="Deposit cost"),
|
||||
'statement_id': fields.many2many('account.bank.statement.line', 'auction_statement_line_rel', 'auction_id', 'statement', 'Payment', help="Bank statement Line For Given Buyer"),
|
||||
'statement_id': fields.many2many('account.bank.statement.line', 'auction_statement_line_rel', 'auction_id', 'statement', 'Payment', help="Bank statement line for given buyer"),
|
||||
'net_revenue':fields.function(_getprice, method=True, string='Net revenue', store=True, multi="net_revenue", help="Buyer Price - Seller Price - Indirect Cost"),
|
||||
'net_margin':fields.function(_getprice, method=True, string='Net Margin (%)', store=True, multi="net_margin", help="(Net Revenue * 100)/ Object Price"),
|
||||
}
|
||||
|
@ -582,7 +597,6 @@ class auction_lots(osv.osv):
|
|||
raise orm.except_orm(_('Missed buyer !'), _('The object "%s" has no buyer assigned.') % (lot.name,))
|
||||
else:
|
||||
partner_ref =lot.ach_uid.id
|
||||
lot_name = lot.obj_num
|
||||
res = res_obj.address_get(cr, uid, [partner_ref], ['contact', 'invoice'])
|
||||
contact_addr_id = res['contact']
|
||||
invoice_addr_id = res['invoice']
|
||||
|
@ -636,16 +650,12 @@ class auction_lots(osv.osv):
|
|||
inv_line_obj = self.pool.get('account.invoice.line')
|
||||
wf_service = netsvc.LocalService('workflow')
|
||||
for lot in self.browse(cr, uid, ids, context):
|
||||
partner_id = lot.bord_vnd_id.partner_id.id
|
||||
if not lot.auction_id.id:
|
||||
continue
|
||||
lot_name = lot.obj_num
|
||||
if lot.bord_vnd_id.id in invoices:
|
||||
inv_id = invoices[lot.bord_vnd_id.id]
|
||||
else:
|
||||
res = partner_obj.address_get(cr, uid, [lot.bord_vnd_id.partner_id.id], ['contact', 'invoice'])
|
||||
contact_addr_id = res['contact']
|
||||
invoice_addr_id = res['invoice']
|
||||
inv = {
|
||||
'name': 'Auction:' +lot.name,
|
||||
'journal_id': lot.auction_id.journal_seller_id.id,
|
||||
|
@ -694,7 +704,6 @@ class auction_lots(osv.osv):
|
|||
|
||||
RETURN: id of generated invoice
|
||||
"""
|
||||
dt = time.strftime('%Y-%m-%d')
|
||||
inv_ref = self.pool.get('account.invoice')
|
||||
res_obj = self.pool.get('res.partner')
|
||||
inv_line_obj = self.pool.get('account.invoice.line')
|
||||
|
@ -711,8 +720,6 @@ class auction_lots(osv.osv):
|
|||
add = res_obj.read(cr, uid, [lot.ach_uid.id], ['address'])[0]['address']
|
||||
if not len(add):
|
||||
raise orm.except_orm(_('Missed Address !'), _('The Buyer has no Invoice Address.'))
|
||||
price = lot.obj_price or 0.0
|
||||
lot_name =lot.obj_num
|
||||
inv = {
|
||||
'name':lot.auction_id.name or '',
|
||||
'reference': lot.ach_login,
|
||||
|
@ -761,7 +768,7 @@ class auction_bid(osv.osv):
|
|||
_order = 'id desc'
|
||||
_columns = {
|
||||
'partner_id': fields.many2one('res.partner', 'Buyer Name', required=True),
|
||||
'contact_tel':fields.char('Contact', size=64),
|
||||
'contact_tel':fields.char('Contact Number', size=64),
|
||||
'name': fields.char('Bid ID', size=64, required=True),
|
||||
'auction_id': fields.many2one('auction.dates', 'Auction Date', required=True),
|
||||
'bid_lines': fields.one2many('auction.bid_line', 'bid_id', 'Bid'),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem name="Auction Management" id="auction_menu_root" icon="terp-purchase" sequence="26" groups="base.group_system"/>
|
||||
<menuitem name="Auction" id="auction_menu_root" icon="terp-purchase" sequence="26" groups="base.group_system"/>
|
||||
<menuitem name="Configuration" parent="auction_menu_root" id="auction_config_menu" sequence="7"/>
|
||||
<menuitem name="Tools Bar Codes" id="auction_outils_menu" parent="auction_menu_root" sequence="5" />
|
||||
<menuitem name="Deliveries Management" action="action_auction_taken" id="menu_wizard_emporte" parent="auction_outils_menu"/>
|
||||
|
@ -14,9 +14,8 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Artists">
|
||||
<field name="name"/>
|
||||
<field name="birth_death_dates"/>
|
||||
<field name="biography"/>
|
||||
<field name="name"/>
|
||||
<field name="birth_death_dates"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -26,12 +25,15 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Artists">
|
||||
<field colspan="4" name="name" select="1"/>
|
||||
<field colspan="4" name="pseudo" select="1"/>
|
||||
<newline/>
|
||||
<field colspan="4" name="birth_death_dates"/>
|
||||
<newline/>
|
||||
<field colspan="4" name="biography"/>
|
||||
<separator string="Author/Artist" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" colspan="4" string="Name"/>
|
||||
<newline/>
|
||||
<field name="pseudo"/>
|
||||
<field name="birth_death_dates"/>
|
||||
</group>
|
||||
<separator string="Biography" colspan="4"/>
|
||||
<field name="biography" nolabel="1" colspan="4"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -105,27 +107,39 @@
|
|||
<field name="name" colspan="2" select="1"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Auction Dates">
|
||||
<separator string="Exposition Dates" colspan="4"/>
|
||||
<field name="expo1"/>
|
||||
<field name="expo2"/>
|
||||
<separator string="Auction Dates" colspan="4"/>
|
||||
<field name="auction1" select="1"/>
|
||||
<field name="auction2" select="1"/>
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Exposition Dates" colspan="4"/>
|
||||
<field name="expo1"/>
|
||||
<field name="expo2"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Auction Dates" colspan="4"/>
|
||||
<field name="auction1" select="1"/>
|
||||
<field name="auction2" select="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="" colspan="4"/>
|
||||
<field name="state"/>
|
||||
<button name="close" states="draft" string="Create Invoices" type="object" colspan="2" icon="gtk-yes"/>
|
||||
</page>
|
||||
<page string="Accounting" >
|
||||
<separator string="Accounting" colspan="4"/>
|
||||
<field name="acc_expense" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="acc_income" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<separator string="Analytic" colspan="4"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="journal_seller_id"/>
|
||||
<field name="account_analytic_id" groups="base.group_extended"/>
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Accounting" colspan="4"/>
|
||||
<field name="acc_expense" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="acc_income" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Analytic" colspan="4"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="journal_seller_id"/>
|
||||
<field name="account_analytic_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Commissions">
|
||||
<group col="4" colspan="4">
|
||||
<group col="4" colspan="4" expand="1">
|
||||
<group col="2" colspan="4">
|
||||
<separator string="Buyer Commissions" colspan="4"/>
|
||||
<field name="buyer_costs" domain="[('parent_id','=',False),('domain','=','auction'),('type_tax_use','<>','sale')]" nolabel="1" colspan="4"/>
|
||||
|
@ -136,6 +150,44 @@
|
|||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="History">
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Buyer Invoices" colspan="2"/>
|
||||
<field name="buyer_invoice_history" nolabel="1" widget="one2many_list"
|
||||
height="400">
|
||||
<tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" string="Invoice">
|
||||
<field name="date_invoice"/>
|
||||
<field name="number"/>
|
||||
<field name="partner_id" groups="base.group_user"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="user_id"/>
|
||||
<field name="date_due"/>
|
||||
<field name="origin"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Seller Invoices" colspan="2"/>
|
||||
<field name="seller_invoice_history" nolabel="1" widget="one2many_list"
|
||||
height="400">
|
||||
<tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" string="Invoice">
|
||||
<field name="date_invoice"/>
|
||||
<field name="number"/>
|
||||
<field name="partner_id" groups="base.group_user"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="user_id"/>
|
||||
<field name="date_due"/>
|
||||
<field name="origin"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -332,13 +384,10 @@
|
|||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Note">
|
||||
<field name="obj_desc" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="History" groups="base.group_extended">
|
||||
<group colspan="2" col="2">
|
||||
<field name="statement_id" domain="[('state','=','draft')]" colspan="4" nolabel="1"
|
||||
widget="one2many_list">
|
||||
height="575" width="285" widget="one2many_list">
|
||||
<tree string="Buyer's Payment History">
|
||||
<field name="statement_id"/>
|
||||
<field name="amount"/>
|
||||
|
@ -352,14 +401,12 @@
|
|||
<field name="account_id"/>
|
||||
<field name="type"/>
|
||||
<field name="statement_id"/>
|
||||
<field name="reconcile_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="reconcile_amount"/>
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<field name="history_ids" colspan="4" readonly="1" nolabel="1">
|
||||
<field name="history_ids" colspan="4" readonly="1" nolabel="1" height="575">
|
||||
<tree string="History">
|
||||
<field name="name"/>
|
||||
<field name="lot_id"/>
|
||||
|
@ -369,6 +416,9 @@
|
|||
</field>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field name="obj_desc" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -450,8 +500,7 @@
|
|||
src_model="auction.lots"
|
||||
id="act_auction_lot_open_bid"/>
|
||||
|
||||
<menuitem name="Objects" parent="auction_menu_root" id="auction_objects_menu" sequence="2"/>
|
||||
<menuitem name="Objects" action="action_all_objects" parent="auction_objects_menu" id="auction_all_objects_menu"/>
|
||||
<menuitem name="Objects" action="action_all_objects" parent="auction_date_menu" id="auction_all_objects_menu"/>
|
||||
|
||||
<record model="ir.ui.view" id="view_deposit_border_form">
|
||||
<field name="name">auction.deposit.form</field>
|
||||
|
@ -459,14 +508,15 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Deposit Border Form">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date_dep" select="1"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="method"/>
|
||||
<newline/>
|
||||
<field name="tax_id" domain="[('domain','=','auction'),('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
|
||||
<field name="transfer"/>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" string="Reference"/>
|
||||
<field name="date_dep"/>
|
||||
<field name="partner_id"/>
|
||||
<newline/>
|
||||
<field name="method"/>
|
||||
<field name="tax_id" domain="[('domain','=','auction'),('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
|
||||
<field name="transfer"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General Information">
|
||||
<field name="lot_id" colspan="4" mode="tree,graph" nolabel="1">
|
||||
|
@ -640,11 +690,13 @@
|
|||
<field name="model">auction.bid</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bids">
|
||||
<field name="name" select="1"/>
|
||||
<field name="auction_id" select="1"/>
|
||||
<newline/>
|
||||
<field name="partner_id" select="1" on_change="onchange_contact(partner_id)"/>
|
||||
<field name="contact_tel"/>
|
||||
<group colspan="4" col="6">
|
||||
<field name="name"/>
|
||||
<field name="auction_id"/>
|
||||
<field name="contact_tel"/>
|
||||
<newline/>
|
||||
<field name="partner_id" on_change="onchange_contact(partner_id)" colspan="4"/>
|
||||
</group>
|
||||
<field name="bid_lines" colspan="4" nolabel="1">
|
||||
<tree string="Bids Lines" editable="bottom">
|
||||
<field name="lot_id" domain="[('auction_id','=',parent.auction_id)]"/>
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
sequence="1"
|
||||
id="menu_board_auction_open" icon="terp-graph" parent="menu_board_auction"/>
|
||||
|
||||
<menuitem name="Auction Management" id="auction.auction_menu_root" icon="terp-purchase" sequence="26" groups="base.group_system" action="open_board_auction"/>
|
||||
<menuitem name="Auction" id="auction.auction_menu_root" icon="terp-purchase" sequence="26" groups="base.group_system" action="open_board_auction"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -74,10 +74,10 @@
|
|||
<para style="P4">[[ o.ach_uid and o.ach_uid.name or False]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P5"><font>[[o.bid_lines[0] and o.bid_lines[0].bid_id.name or removeParentNode('font')]]</font></para>
|
||||
<para style="P5"><font>[[ o.bid_lines and o.bid_lines[0] and o.bid_lines[0].bid_id.name or removeParentNode('font')]]</font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P6"><font>[[o.bid_lines[0] and o.bid_lines[0].bid_id.contact_tel or removeParentNode('font')]]</font></para>
|
||||
<para style="P6"><font>[[o.bid_lines and o.bid_lines[0] and o.bid_lines[0].bid_id.contact_tel or removeParentNode('font')]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
<para style="P8">[[o.lot_est1]]-[[o.lot_est2]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P7"><font>[[o.bid_lines[0] and o.bid_lines[0].bid_id.contact_tel or removeParentNode('font')]]</font></para>
|
||||
<para style="P7"><font>[[o.bid_lines and o.bid_lines[0] and o.bid_lines[0].bid_id.contact_tel or removeParentNode('font')]]</font></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
<label string="(Keep empty for automatic number)" colspan="2"/>
|
||||
</group>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<group colspan="2" col="2"/>
|
||||
<group colspan="2" col="2">
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
<button icon="gtk-yes" string="Create invoices" name="makeInvoices" type="object"/>
|
||||
</group>
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
<field name="statement_id3" domain="[('state','=','draft')]"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<group colspan="2" col="2"/>
|
||||
<group colspan="2" col="2">
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
<button icon="gtk-yes" string="Pay" name="pay_and_reconcile" type="object"/>
|
||||
</group>
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
#
|
||||
##############################################################################
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
import netsvc
|
||||
import pooler
|
||||
import time
|
||||
import tools
|
||||
import wizard
|
||||
|
||||
class auction_taken(osv.osv_memory):
|
||||
"""
|
||||
|
@ -53,7 +47,7 @@ class auction_taken(osv.osv_memory):
|
|||
lot_obj = self.pool.get('auction.lots')
|
||||
for current in self.browse(cr, uid, ids, context):
|
||||
for lot in current.lot_ids:
|
||||
lot_obj.write(cr, uid, lot.id, {'state':'taken_away'})
|
||||
lot_obj.write(cr, uid, lot.id, {'state':'taken_away', 'ach_emp': True})
|
||||
return {'lot_ids': []}
|
||||
|
||||
auction_taken()
|
||||
|
|
|
@ -32,6 +32,21 @@
|
|||
id="menu_crm_lead_categ" name="Categories"
|
||||
parent="base.menu_crm_config_lead" sequence="1"/>
|
||||
|
||||
<!-- Resource Type Form View -->
|
||||
<record id="crm_lead_resource_act" model="ir.actions.act_window">
|
||||
<field name="name">Lead Sources</field>
|
||||
<field name="res_model">crm.case.resource.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_resource_type_tree"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
|
||||
<field name="context">{'object_id':'crm.lead'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_lead_resource_act"
|
||||
id="menu_crm_lead_resource_act" name="Lead Sources"
|
||||
groups="base.group_extended" sequence="2"
|
||||
parent="base.menu_crm_config_lead" />
|
||||
|
||||
<!-- CRM Lead Form View -->
|
||||
<record model="ir.ui.view" id="crm_case_form_view_leads">
|
||||
<field name="name">CRM - Leads Form</field>
|
||||
|
@ -325,7 +340,8 @@
|
|||
help="Show Sales Team"/>
|
||||
</field>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -340,16 +356,21 @@
|
|||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Source" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'categ_id'}"/>
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Creation" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'create_date'}" help="Create Date"/>
|
||||
<filter string="Category" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'categ_id'}"/>
|
||||
<filter string="Campaign" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'type_id'}" />
|
||||
<filter string="Channel" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'channel_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
|
||||
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Creation Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'create_date'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
@ -109,8 +109,23 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Salesman" name="user" icon="terp-personal"
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection"/>
|
||||
<field name="type_id" widget="selection"/>
|
||||
<field name="channel_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="user" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
|
@ -142,21 +157,6 @@
|
|||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" help="Year in which lead/opportunity is created"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection"/>
|
||||
<field name="type_id" widget="selection"/>
|
||||
<field name="channel_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -114,8 +114,21 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Salesman" name="User" icon="terp-personal"
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
|
@ -133,7 +146,7 @@
|
|||
<separator orientation="vertical" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-today"
|
||||
domain="[]" context="{'group_by':'day'}" help="Date of call"/>
|
||||
|
@ -142,19 +155,6 @@
|
|||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" help="Year of call"/>
|
||||
</group>
|
||||
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field string="Type" name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -123,8 +123,25 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Salesman" name="User" icon="terp-personal"
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<filter icon="terp-dialog-close"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
<filter icon="gtk-cancel"
|
||||
string="Cancel"
|
||||
domain="[('state','=','cancel')]"/>
|
||||
<group>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority" />
|
||||
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]"
|
||||
|
@ -161,26 +178,6 @@
|
|||
domain="[]" context="{'group_by':'name'}"
|
||||
help="Year of claim"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<filter icon="terp-dialog-close"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
|
||||
<filter icon="gtk-cancel"
|
||||
string="Cancel"
|
||||
domain="[('state','=','cancel')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority" />
|
||||
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<newline/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -122,8 +122,23 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Salesman" name="User" icon="terp-personal"
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<filter icon="terp-dialog-close"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
|
||||
<filter icon="gtk-cancel"
|
||||
string="Cancel"
|
||||
domain="[('state','=','cancel')]"/>
|
||||
|
||||
<group>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
|
@ -153,25 +168,8 @@
|
|||
help="Month of fundraising"/>
|
||||
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}"
|
||||
help="Year of fundraising"/>
|
||||
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<filter icon="terp-dialog-close"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
|
||||
<filter icon="gtk-cancel"
|
||||
string="Cancel"
|
||||
domain="[('state','=','cancel')]"/>
|
||||
|
||||
<group>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
|
||||
</group>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -118,8 +118,13 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Salesman" icon="terp-personal"
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<filter string="Priority" icon="terp-rating-rated"
|
||||
domain="[]" context="{'group_by':'priority'}" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}"
|
||||
default="1" />
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
|
@ -150,19 +155,7 @@
|
|||
domain="[]" context="{'group_by':'month'}" help="Month of helpdesk requests"/>
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" help="Year of helpdesk requests" />
|
||||
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="categ_id" domain="[('object_id.model', '=', 'crm.helpdesk')]"/>
|
||||
<field name="priority"/>
|
||||
<newline/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -31,6 +31,19 @@
|
|||
<field name="partner_assigned_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="user" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
|
@ -69,19 +82,7 @@
|
|||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -361,11 +361,12 @@ class many2many_domain(fields.many2many):
|
|||
for i in ids:
|
||||
res[i] = []
|
||||
valid_move_ids = move_obj.search(cr, user, self._domain) # move ids relative to domain argument
|
||||
cr.execute("SELECT production_id, move_id from mrp_production_move_ids where production_id in %s and move_id in %s",
|
||||
[tuple(ids), tuple(valid_move_ids)])
|
||||
related_move_map = cr.fetchall()
|
||||
related_move_dict = dict((k, list(set([v[1] for v in itr]))) for k, itr in groupby(related_move_map, itemgetter(0)))
|
||||
res.update(related_move_dict)
|
||||
if valid_move_ids:
|
||||
cr.execute("SELECT production_id, move_id from mrp_production_move_ids where production_id in %s and move_id in %s",
|
||||
[tuple(ids), tuple(valid_move_ids)])
|
||||
related_move_map = cr.fetchall()
|
||||
related_move_dict = dict((k, list(set([v[1] for v in itr]))) for k, itr in groupby(related_move_map, itemgetter(0)))
|
||||
res.update(related_move_dict)
|
||||
|
||||
return res
|
||||
|
||||
|
|
|
@ -69,8 +69,21 @@
|
|||
<field name="location_dest_id" />
|
||||
</group>
|
||||
<newline/>
|
||||
|
||||
<group expand="0" string="Group By...">
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<filter icon="terp-emblem-important" string="Picking Exception" domain="[('state','=','picking_except')]"/>
|
||||
<filter icon="terp-gtk-media-pause" string="Waiting Goods" domain="[('state','=','confirmed')]"/>
|
||||
<filter icon="terp-camera_test" string="Ready to Produce" domain="[('state','=','ready')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="date_finnished"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Raw Material Location" icon="terp-gtk-jump-to-rtl" context="{'group_by':'location_src_id'}"/>
|
||||
<filter string="Finished Products Location" icon="terp-gtk-jump-to-ltr" context="{'group_by':'location_dest_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -87,20 +100,6 @@
|
|||
<separator orientation="vertical"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<filter icon="terp-emblem-important" string="Picking Exception" domain="[('state','=','picking_except')]"/>
|
||||
<filter icon="terp-gtk-media-pause" string="Waiting Goods" domain="[('state','=','confirmed')]"/>
|
||||
<filter icon="terp-camera_test" string="Ready to Produce" domain="[('state','=','ready')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_planned"/>
|
||||
<field name="date_finnished"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -19,12 +19,10 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
from osv import fields,osv
|
||||
import netsvc
|
||||
import mx.DateTime
|
||||
from mx.DateTime import RelativeDateTime, today, DateTime, localtime
|
||||
from tools import config
|
||||
from mx.DateTime import RelativeDateTime, today
|
||||
from tools.translate import _
|
||||
import decimal_precision as dp
|
||||
|
||||
|
@ -95,6 +93,16 @@ class mrp_repair(osv.osv):
|
|||
cur = repair.pricelist_id.currency_id
|
||||
res[id] = cur_obj.round(cr, uid, cur, untax.get(id, 0.0) + tax.get(id, 0.0))
|
||||
return res
|
||||
|
||||
def _get_default_address(self, cr, uid, ids, field_name, arg, context):
|
||||
res = {}
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
for data in self.browse(cr, uid, ids):
|
||||
adr_id = False
|
||||
if data.partner_id:
|
||||
adr_id = partner_obj.address_get(cr, uid, [data.partner_id.id], ['default'])['default']
|
||||
res[data.id] = adr_id
|
||||
return res
|
||||
|
||||
def _get_lines(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
|
@ -109,6 +117,7 @@ class mrp_repair(osv.osv):
|
|||
'product_id': fields.many2one('product.product', string='Product to Repair', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'partner_id' : fields.many2one('res.partner', 'Partner', select=True, help='This field allow you to choose the parner that will be invoiced and delivered'),
|
||||
'address_id': fields.many2one('res.partner.address', 'Delivery Address', domain="[('partner_id','=',partner_id)]"),
|
||||
'default_address_id': fields.function(_get_default_address, method=True, type="many2one", relation="res.partner.address"),
|
||||
'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number', select=True, domain="[('product_id','=',product_id)]"),
|
||||
'state': fields.selection([
|
||||
('draft','Quotation'),
|
||||
|
@ -263,7 +272,6 @@ class mrp_repair(osv.osv):
|
|||
@param product_id: Product id from current record.
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
prodlot_obj = self.pool.get('stock.production.lot')
|
||||
move_obj = self.pool.get('stock.move')
|
||||
data = {}
|
||||
data['value'] = {
|
||||
|
@ -275,7 +283,6 @@ class mrp_repair(osv.osv):
|
|||
|
||||
if not lot:
|
||||
return data
|
||||
lot_info = prodlot_obj.browse(cr, uid, lot)
|
||||
move_ids = move_obj.search(cr, uid, [('prodlot_id', '=', lot)])
|
||||
|
||||
if not len(move_ids):
|
||||
|
@ -328,7 +335,6 @@ class mrp_repair(osv.osv):
|
|||
""" Cancels repair order.
|
||||
@return: True
|
||||
"""
|
||||
ok=True
|
||||
mrp_line_obj = self.pool.get('mrp.repair.line')
|
||||
for repair in self.browse(cr, uid, ids):
|
||||
mrp_line_obj.write(cr, uid, [l.id for l in repair.operations], {'state': 'cancel'})
|
||||
|
@ -496,7 +502,7 @@ class mrp_repair(osv.osv):
|
|||
return True
|
||||
|
||||
def wkf_repair_done(self, cr, uid, ids, *args):
|
||||
res = self.action_repair_done(cr, uid, ids)
|
||||
self.action_repair_done(cr, uid, ids)
|
||||
return True
|
||||
|
||||
def action_repair_done(self, cr, uid, ids, context=None):
|
||||
|
@ -509,7 +515,6 @@ class mrp_repair(osv.osv):
|
|||
repair_line_obj = self.pool.get('mrp.repair.line')
|
||||
seq_obj = self.pool.get('ir.sequence')
|
||||
pick_obj = self.pool.get('stock.picking')
|
||||
company = self.pool.get('res.users').browse(cr, uid, uid).company_id
|
||||
for repair in self.browse(cr, uid, ids, context=context):
|
||||
for move in repair.operations:
|
||||
move_id = move_obj.create(cr, uid, {
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
import time
|
||||
from report import report_sxw
|
||||
from osv import osv
|
||||
import pooler
|
||||
|
||||
class order(report_sxw.rml_parse):
|
||||
def __init__(self, cr, uid, name, context):
|
||||
|
@ -30,10 +28,8 @@ class order(report_sxw.rml_parse):
|
|||
self.localcontext.update({
|
||||
'time': time,
|
||||
'total': self.total,
|
||||
'adr_get' : self._adr_get
|
||||
})
|
||||
|
||||
|
||||
def total(self, repair):
|
||||
total = 0.0
|
||||
for operation in repair.operations:
|
||||
|
@ -43,13 +39,6 @@ class order(report_sxw.rml_parse):
|
|||
total = total + repair.amount_tax
|
||||
return total
|
||||
|
||||
def _adr_get(self, partner, type):
|
||||
res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
|
||||
res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address')
|
||||
addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type])
|
||||
adr_id = addresses and addresses[type] or False
|
||||
return adr_id and res_partner_address.read(self.cr, self.uid, [adr_id])[0] or False
|
||||
|
||||
report_sxw.report_sxw('report.repair.order','mrp.repair','addons/mrp_repair/report/order.rml',parser=order)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="P13">Invoice address</para>
|
||||
<para style="P13">Invoice address :</para>
|
||||
<para style="P3">[[ o.partner_id and o.partner_id.property_payment_term.name ]]</para>
|
||||
<para style="P3">[[ o.partner_invoice_id.street ]]</para>
|
||||
<para style="P3">[[ o.partner_invoice_id.street2 or removeParentNode('para') ]]</para>
|
||||
|
@ -189,12 +189,12 @@
|
|||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="P3">[[ o.partner_id.name ]]</para>
|
||||
<para style="P3">[[ o.partner_id and adr_get(o.partner_id, 'default')['street'] ]]</para>
|
||||
<para style="P3">[[ o.partner_id and adr_get(o.partner_id, 'default')['street2'] or removeParentNode('para') ]]</para>
|
||||
<para style="P3">[[ o.partner_id and adr_get(o.partner_id, 'default')['zip'] ]][[ o.partner_id and adr_get(o.partner_id, 'default')['city'] ]]</para>
|
||||
<para style="P3">[[ (o.partner_id and adr_get(o.partner_id, 'default')['state_id'] and adr_get(o.partner_id, 'default')['state_id'][1]) or removeParentNode('para') ]]</para>
|
||||
<para style="P3">[[ o.partner_id and adr_get(o.partner_id, 'default')['country_id'] and adr_get(o.partner_id, 'default')['country_id'][1] ]]</para>
|
||||
<para style="P3">[[ o.partner_id.name or removeParentNode('para') ]]</para>
|
||||
<para style="P3">[[ o.default_address_id and o.default_address_id.street or removeParentNode('para') ]]</para>
|
||||
<para style="P3">[[ o.default_address_id and o.default_address_id.street2 or removeParentNode('para') ]]</para>
|
||||
<para style="P3">[[ o.default_address_id and o.default_address_id.zip or removeParentNode('para') ]][[ o.default_address_id and o.default_address_id.city or removeParentNode('para') ]]</para>
|
||||
<para style="P3">[[ o.default_address_id and o.default_address_id.state_id and o.default_address_id.state_id.name or removeParentNode('para') ]]</para>
|
||||
<para style="P3">[[ o.default_address_id and o.default_address_id.country_id and o.default_address_id.country_id.name or removeParentNode('para') ]]</para>
|
||||
<para style="P3">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<newline/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon="gtk-stop" special="cancel"
|
||||
string="_No" />
|
||||
<button name="cancel_repair" string="_Yes"
|
||||
string="No" />
|
||||
<button name="cancel_repair" string="Yes"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
</group>
|
||||
</form>
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<newline/>
|
||||
<group col="2" colspan="4">
|
||||
<button icon="gtk-stop" special="cancel"
|
||||
string="_Cancel" />
|
||||
<button name="make_invoices" string="Create _Invoice"
|
||||
string="Cancel" />
|
||||
<button name="make_invoices" string="Create Invoice"
|
||||
colspan="1" type="object" icon="terp-dolar" />
|
||||
</group>
|
||||
</form>
|
||||
|
|
|
@ -67,7 +67,7 @@ class all_closed_cashbox_of_the_day(report_sxw.rml_parse):
|
|||
|
||||
def _get_bal(self,data):
|
||||
res = {}
|
||||
sql =""" select sum(pieces*number) as bal from singer_statement where starting_id = %d """%(data['id'])
|
||||
sql =""" select sum(pieces*number) as bal from account_cashbox_line where starting_id = %d """%(data['id'])
|
||||
self.cr.execute(sql)
|
||||
res = self.cr.dictfetchall()
|
||||
if res :
|
||||
|
@ -115,7 +115,7 @@ class all_closed_cashbox_of_the_day(report_sxw.rml_parse):
|
|||
res = self.cr.dictfetchall()
|
||||
for r in res :
|
||||
total_ending_bal += (r['net_total'] or 0.0)
|
||||
sql1 =""" select sum(pieces*number) as bal from singer_statement where starting_id = %d"""%(r['id'])
|
||||
sql1 =""" select sum(pieces*number) as bal from account_cashbox_line where starting_id = %d"""%(r['id'])
|
||||
self.cr.execute(sql1)
|
||||
data = self.cr.dictfetchall()
|
||||
if data[0]['bal']:
|
||||
|
@ -125,10 +125,7 @@ class all_closed_cashbox_of_the_day(report_sxw.rml_parse):
|
|||
return lst
|
||||
|
||||
def _get_net_total(self,user):
|
||||
lst = []
|
||||
res={}
|
||||
total_ending_bal = 0.0
|
||||
total_starting_bal = 0.0
|
||||
sql = """select sum(absl.amount) as net_total from account_bank_statement as abs
|
||||
LEFT JOIN account_bank_statement_line as absl ON abs.id = absl.statement_id
|
||||
where abs.state IN ('confirm','open') and abs.user_id = %d
|
||||
|
|
|
@ -53,7 +53,7 @@ class pos_payment_report_user(report_sxw.rml_parse):
|
|||
"and po.state='paid' and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date = current_date " \
|
||||
"and po.user_id IN %s",(tuple(ids),))
|
||||
res=self.cr.fetchone()
|
||||
res = res and res[0] or None
|
||||
res = res and res[0] or 0.0
|
||||
|
||||
return res
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
<para style="terp_default_Centre_9">E-mail : [[ address and address.email ]]</para>
|
||||
<para style="terp_default_Centre_9">Shop : [[ o.shop_id.name ]]</para>
|
||||
<para style="terp_default_Centre_9">Vendeur : [[ o.user_salesman_id.name ]]</para>
|
||||
<para style="terp_default_Centre_9">Date : [[ formatLang(o.date_order,date = True) ]]</para>
|
||||
<para style="terp_default_Centre_9">Date : [[ formatLang(o.date_order,date_time = True) ]]</para>
|
||||
<para style="P4">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="12">
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
|
|
@ -73,7 +73,12 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="10" col="12">
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="date_validation"/>
|
||||
<field name="date_payment"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Salesman" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Customer" icon="terp-personal" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -83,11 +88,6 @@
|
|||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Month of order date"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Year of order date"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="date_validation"/>
|
||||
<field name="date_payment"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -29,7 +29,7 @@ class add_product(osv.osv_memory):
|
|||
|
||||
_columns = {
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True),
|
||||
'quantity': fields.float('Quantity ', required=True),
|
||||
'quantity': fields.float('Quantity', required=True),
|
||||
}
|
||||
_defaults = {
|
||||
'quantity': lambda *a: 1,
|
||||
|
@ -73,7 +73,6 @@ class add_product(osv.osv_memory):
|
|||
|
||||
record_id = context and context.get('active_id', False)
|
||||
order_obj= self.pool.get('pos.order')
|
||||
order_line_obj= self.pool.get('pos.order.line')
|
||||
obj=order_obj.browse(cr, uid, record_id)
|
||||
order_obj.write(cr, uid, [record_id], {'state':'done'})
|
||||
if obj.amount_total != obj.amount_paid:
|
||||
|
|
|
@ -4,25 +4,32 @@
|
|||
<!-- Add Product -->
|
||||
|
||||
<record id="view_add_product" model="ir.ui.view">
|
||||
<field name="name">Add Product</field>
|
||||
<field name="name">Add Product</field>
|
||||
<field name="model">pos.add.product</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Add product :">
|
||||
<group col="2" colspan="4">
|
||||
<group col="6" colspan="4">
|
||||
<field name="product_id"/>
|
||||
<field name="quantity"/>
|
||||
<button icon='gtk-cancel' name="close_action"
|
||||
string="Close" type="object" />
|
||||
<button name="select_product" string="Continue"
|
||||
colspan="1" type="object" icon="gtk-ok" />
|
||||
<separator string="" colspan="4"/>
|
||||
<newline/>
|
||||
<group colspan="4" col="4">
|
||||
<label string="" colspan="1"/>
|
||||
<button icon="gtk-stop" special="cancel"
|
||||
string="Cancel"/>
|
||||
<button icon="gtk-ok" name="close_action"
|
||||
string="Save & Close" type="object"/>
|
||||
<button name="select_product" string="Save & New"
|
||||
colspan="1" type="object" icon="gtk-add"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_add_product" model="ir.actions.act_window">
|
||||
<field name="name">Add Product</field>
|
||||
<field name="name">Add Product</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">pos.add.product</field>
|
||||
<field name="view_type">form</field>
|
||||
|
|
|
@ -22,11 +22,7 @@
|
|||
import netsvc
|
||||
from osv import osv,fields
|
||||
from tools.translate import _
|
||||
from mx import DateTime
|
||||
import time
|
||||
import pos_box_entries
|
||||
import pos_add_product
|
||||
import pos_payment
|
||||
|
||||
class pos_return(osv.osv_memory):
|
||||
_name = 'pos.return'
|
||||
|
@ -169,9 +165,7 @@ class pos_return(osv.osv_memory):
|
|||
wf_service = netsvc.LocalService("workflow")
|
||||
#Todo :Need to clean the code
|
||||
if active_id:
|
||||
picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in',[active_id]), ('state', '=', 'done')])
|
||||
data = self.read(cr, uid, ids)[0]
|
||||
clone_list = []
|
||||
date_cur = time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
||||
for order_id in order_obj.browse(cr, uid, [active_id], context=context):
|
||||
|
@ -197,7 +191,7 @@ class pos_return(osv.osv_memory):
|
|||
qty = data['return%s' %line.id]
|
||||
except :
|
||||
qty = line.qty
|
||||
new_move = stock_move_obj.create(cr, uid, {
|
||||
stock_move_obj.create(cr, uid, {
|
||||
'product_qty': qty ,
|
||||
'product_uos_qty': uom_obj._compute_qty(cr, uid, qty ,line.product_id.uom_id.id),
|
||||
'picking_id': new_picking,
|
||||
|
@ -246,19 +240,13 @@ class add_product(osv.osv_memory):
|
|||
data = data and data[0] or False
|
||||
if active_id:
|
||||
order_obj = self.pool.get('pos.order')
|
||||
lines_obj = self.pool.get('pos.order.line')
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
stock_move_obj = self.pool.get('stock.move')
|
||||
move_obj = self.pool.get('stock.move')
|
||||
property_obj= self.pool.get("ir.property")
|
||||
invoice_obj= self.pool.get('account.invoice')
|
||||
picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in',[active_id]), ('state', '=', 'done')])
|
||||
clone_list = []
|
||||
date_cur=time.strftime('%Y-%m-%d')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
prod_obj=self.pool.get('product.product')
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
return_boj=self.pool.get('pos.return')
|
||||
order_obj.add_product(cr, uid, active_id, data['product_id'], data['quantity'], context=context)
|
||||
|
||||
for order_id in order_obj.browse(cr, uid, [active_id], context=context):
|
||||
|
@ -279,7 +267,7 @@ class add_product(osv.osv_memory):
|
|||
'type':'out',
|
||||
'date':date_cur
|
||||
})
|
||||
new_move=stock_move_obj.create(cr, uid, {
|
||||
stock_move_obj.create(cr, uid, {
|
||||
'product_qty': qty,
|
||||
'product_uos_qty': uom_obj._compute_qty(cr, uid, prod_id.uom_id.id, qty, prod_id.uom_id.id),
|
||||
'picking_id':new_picking,
|
||||
|
@ -296,7 +284,6 @@ class add_product(osv.osv_memory):
|
|||
picking_obj.force_assign(cr, uid, [new_picking], context)
|
||||
order_obj.write(cr,uid,active_id,{'picking_id':new_picking})
|
||||
|
||||
|
||||
return {
|
||||
'name': _('Add Product'),
|
||||
'view_type': 'form',
|
||||
|
@ -315,17 +302,17 @@ class add_product(osv.osv_memory):
|
|||
lines_obj = self.pool.get('pos.order.line')
|
||||
picking_obj = self.pool.get('stock.picking')
|
||||
stock_move_obj = self.pool.get('stock.move')
|
||||
move_obj = self.pool.get('stock.move')
|
||||
property_obj= self.pool.get("ir.property")
|
||||
invoice_obj=self.pool.get('account.invoice')
|
||||
picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in', active_ids), ('state', '=', 'done')])
|
||||
clone_list = []
|
||||
date_cur=time.strftime('%Y-%m-%d %H:%M:%S')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
return_boj=self.pool.get('pos.return')
|
||||
return_id=return_boj.search(cr,uid,[])
|
||||
data=return_boj.read(cr,uid,return_id,[])[0]
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
self_data = self.read(cr, uid, ids)[0]
|
||||
order_obj.add_product(cr, uid, active_ids[0], self_data['product_id'], self_data['quantity'], context=context)
|
||||
|
||||
for order_id in order_obj.browse(cr, uid, active_ids, context=context):
|
||||
prop_ids =property_obj.search(cr, uid, [('name', '=', 'property_stock_customer')])
|
||||
val = property_obj.browse(cr, uid, prop_ids[0]).value_reference
|
||||
|
@ -345,10 +332,18 @@ class add_product(osv.osv_memory):
|
|||
})
|
||||
for line in order_id.lines:
|
||||
key=('return%s') %line.id
|
||||
if line.id and data.has_key(key):
|
||||
new_move=stock_move_obj.create(cr, uid, {
|
||||
'product_qty': data['return%s' %line.id ],
|
||||
'product_uos_qty': uom_obj._compute_qty(cr, uid, data['return%s' %line.id], line.product_id.uom_id.id),
|
||||
if line.id:
|
||||
if data.has_key(key):
|
||||
qty = data['return%s' %line.id]
|
||||
lines_obj.write(cr,uid,[line.id], {
|
||||
'qty_rfd':(line.qty or 0.0) + data['return%s' %line.id],
|
||||
'qty':line.qty-(data['return%s' %line.id] or 0.0)
|
||||
})
|
||||
else:
|
||||
qty = line.qty
|
||||
stock_move_obj.create(cr, uid, {
|
||||
'product_qty': qty,
|
||||
'product_uos_qty': uom_obj._compute_qty(cr, uid, qty, line.product_id.uom_id.id),
|
||||
'picking_id':new_picking,
|
||||
'product_uom':line.product_id.uom_id.id,
|
||||
'location_id':location_id,
|
||||
|
@ -358,10 +353,6 @@ class add_product(osv.osv_memory):
|
|||
'date':date_cur,
|
||||
'date_planned':date_cur
|
||||
})
|
||||
lines_obj.write(cr,uid,[line.id], {
|
||||
'qty_rfd':(line.qty or 0.0) + data['return%s' %line.id],
|
||||
'qty':line.qty-(data['return%s' %line.id] or 0.0)
|
||||
})
|
||||
wf_service.trg_validate(uid, 'stock.picking',new_picking,'button_confirm', cr)
|
||||
picking_obj.force_assign(cr, uid, [new_picking], context)
|
||||
obj=order_obj.browse(cr,uid, active_ids[0])
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
<field name="name"/>
|
||||
<field name="categ_id" widget="selection" operator="child_of"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="pricelist_id" widget="selection" context="{'pricelist': self}" />
|
||||
</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'}" />
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -28,10 +32,7 @@
|
|||
<separator orientation="vertical"/>
|
||||
<filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="pricelist_id" widget="selection" context="{'pricelist': self}" />
|
||||
</group>
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -107,6 +107,17 @@
|
|||
<field name="partner_id" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." colspan="10" col="12" groups="base.group_extended">
|
||||
<field name="type_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="date_end"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Project" name="project" icon="terp-folder-blue" context="{'group_by':'project_id'}"/>
|
||||
<filter string="Task" icon="terp-stock_align_left_24" context="{'group_by':'name'}" />
|
||||
|
@ -122,16 +133,6 @@
|
|||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Current Month"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Current Year"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." colspan="10" col="12" groups="base.group_extended">
|
||||
<field name="priority" string="Priority"/>
|
||||
<field name="type_id" widget="selection"/>
|
||||
<newline/>
|
||||
<field name="date_start"/>
|
||||
<field name="date_end"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -93,6 +93,23 @@
|
|||
<field name="user_id" select="1" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." colspan="10" col="12" groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<field name="assigned_to" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed" string="Date Closed"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<filter name="User" string="Responsible" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
|
@ -130,23 +147,6 @@
|
|||
domain="[]" context="{'group_by':'name'}" help="Current Year"/>
|
||||
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." colspan="10" col="12" groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<field name="assigned_to" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="type_id" widget="selection"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed" string="Date Closed"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -78,6 +78,20 @@
|
|||
<field name="product_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended filters..." colspan="10" col="12" groups="base.group_extended">
|
||||
<field name="user_id"/>
|
||||
<field name="validator"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="location_id"/>
|
||||
<field name="warehouse_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="date"/>
|
||||
<field name="date_approve"/>
|
||||
<field name="expected_date"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Supplier" name="group_partner_id" icon="terp-personal" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Product" name="group_product_id" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
|
@ -96,20 +110,6 @@
|
|||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'name'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended filters..." colspan="10" col="12" groups="base.group_extended">
|
||||
<field name="user_id"/>
|
||||
<field name="validator"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="location_id"/>
|
||||
<field name="warehouse_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="date"/>
|
||||
<field name="date_approve"/>
|
||||
<field name="expected_date"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -85,6 +85,15 @@
|
|||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="date"/>
|
||||
<field name="date_confirm"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="shop_id" widget="selection"/>
|
||||
<field name="categ_id" widget="selection"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Salesman" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
|
||||
|
@ -104,15 +113,6 @@
|
|||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}" help="Ordered month of the sales order"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Ordered Year of the sales order"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="shop_id"/>
|
||||
<field name="categ_id" widget="selection"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="date"/>
|
||||
<field name="date_confirm"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -468,7 +468,8 @@ class sale_order(osv.osv):
|
|||
lines = []
|
||||
for line in o.order_line:
|
||||
if line.invoiced:
|
||||
raise osv.except_osv(_('Error !'), _('The Sale Order already has some lines invoiced. You should continue the billing process by line.'))
|
||||
#raise osv.except_osv(_('Error !'), _('The Sale Order already has some lines invoiced. You should continue the billing process by line.'))
|
||||
continue
|
||||
elif (line.state in states):
|
||||
lines.append(line.id)
|
||||
created_lines = self.pool.get('sale.order.line').invoice_line_create(cr, uid, lines)
|
||||
|
|
|
@ -32,35 +32,38 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Search Margin">
|
||||
<group col="10" colspan="4">
|
||||
<filter icon="terp-account" string="This Year" domain="[('year','=',time.strftime('%%Y'))]" help="All Months Sales by Margin"/>
|
||||
<filter icon="terp-account" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="This Months Sales by Margin"/>
|
||||
<filter string="Draft" icon="terp-account" domain="[('state','=','draft')]" help="Draft Invoices"/>
|
||||
<filter string="Pro-forma" icon="terp-account" domain="[('state','=','proforma')]" help="Pro-forma Invoices"/>
|
||||
<filter string="Current" icon="terp-account" domain="[('state', '=' ,'open')]" help="open Invoices"/>
|
||||
<filter string="Done" icon="terp-account" domain="[('state','=','paid')]" help="Done Invoices"/>
|
||||
<filter icon="terp-go-year" string="This Year" domain="[('year','=',time.strftime('%%Y'))]" help="All Months Sales by Margin"/>
|
||||
<filter icon="terp-go-month" string="This Month" domain="[('month','=',time.strftime('%%m'))]" help="This Months Sales by Margin"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help="Draft Invoices"/>
|
||||
<filter string="Pro-forma" icon="terp-check" domain="[('state','=','proforma')]" help="Pro-forma Invoices"/>
|
||||
<filter string="Current" icon="terp-check" domain="[('state', '=' ,'open')]" help="open Invoices"/>
|
||||
<filter string="Done" icon="terp-dialog-close" domain="[('state','=','paid')]" help="Done Invoices"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="date" string="Date Invoiced"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id" widget="selection"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="amount" />
|
||||
<field name="state"/>
|
||||
<newline/>
|
||||
<field name="product_id"/>
|
||||
<field name="categ_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="4" col="10">
|
||||
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Category" icon="terp-account" context="{'group_by':'categ_id'}"/>
|
||||
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
|
||||
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
|
||||
<filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Category" icon="terp-stock_symbol-selection" context="{'group_by':'categ_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-go-month" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
<field name="date" string="Date Invoiced"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id" widget="selection"/>
|
||||
<field name="amount" />
|
||||
<field name="state"/>
|
||||
<newline/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="product_id"/>
|
||||
<field name="categ_id"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue