[IMP]:auction,mrp,sale:Code Review & Optimization

bzr revid: mso@mso-20100315121815-f6iohh9sbbisopkv
This commit is contained in:
mso 2010-03-15 17:48:15 +05:30
commit aed34ff6f9
47 changed files with 3332 additions and 1037 deletions

View File

@ -0,0 +1,335 @@
# Occitan (post 1500) translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-12 13:35+0000\n"
"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-13 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_invoiced:0
msgid ""
"Number of hours that can be invoiced plus those that already have been "
"invoiced."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_user
msgid "Hours summary by user"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,last_invoice_date:0
msgid "Last Invoice Date"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_ca:0
msgid "Computed using the formula: Max Invoice Price - Invoiced Amount."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_hours:0
msgid "Computed using the formula: Maximum Quantity - Hours Tot."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all
msgid "All Analytic Accounts"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_open
#: model:ir.ui.menu,name:account_analytic_analysis.menu_analytic_account_to_valid_open
msgid "My Current Accounts"
msgstr ""
#. module: account_analytic_analysis
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: account_analytic_analysis
#: help:account.analytic.account,last_invoice_date:0
msgid "Date of the last invoice created for this analytic account."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_theorical:0
msgid "Theorical Revenue"
msgstr ""
#. module: account_analytic_analysis
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,theorical_margin:0
msgid "Computed using the formula: Theorial Revenue - Total Costs"
msgstr ""
#. module: account_analytic_analysis
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_new
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_new
msgid "New Analytic Account"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,theorical_margin:0
msgid "Theorical Margin"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,real_margin_rate:0
msgid "Real Margin Rate (%)"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_all_open
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all_open
msgid "Current Analytic Accounts"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,last_worked_date:0
msgid "Date of the latest work done on this account."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,last_worked_invoiced_date:0
msgid ""
"If invoice from the costs, this is the date of the latest work or cost that "
"have been invoiced."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_invoicing
msgid "Invoicing"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,last_worked_date:0
msgid "Date of Last Cost/Work"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,total_cost:0
msgid "Total Costs"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_quantity:0
msgid ""
"Number of hours you spent on the analytic account (from timesheet). It "
"computes on all journal of type 'general'."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_hours:0
msgid "Remaining Hours"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_theorical:0
msgid ""
"Based on the costs you had on the project, what would have been the revenue "
"if all these costs have been invoiced at the normal sale price provided by "
"the pricelist."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,user_ids:0
#: field:account_analytic_analysis.summary.user,user:0
msgid "User"
msgstr "Utilizaire"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_pending
#: model:ir.ui.menu,name:account_analytic_analysis.menu_analytic_account_to_valid_pending
msgid "My Pending Accounts"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_hr_tree_invoiced_my
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_hr_tree_invoiced_my
msgid "My Uninvoiced Entries"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,real_margin:0
msgid "Computed using the formula: Invoiced Amount - Total Costs."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed
#: model:ir.ui.menu,name:account_analytic_analysis.menu_analytic_account_managed
msgid "My Accounts"
msgstr "Mos comptes"
#. module: account_analytic_analysis
#: model:ir.module.module,description:account_analytic_analysis.module_meta_information
msgid ""
"Modify account analytic view to show\n"
"important data for project manager of services companies.\n"
"Add menu to show relevant information for each manager."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_non_invoiced:0
msgid "Uninvoiced Hours"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_quantity:0
msgid "Hours Tot"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_account
msgid "Analytic Accounts"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.module.module,shortdesc:account_analytic_analysis.module_meta_information
msgid "report_account_analytic"
msgstr "report_account_analytic"
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_invoiced:0
msgid "Invoiced Amount"
msgstr "Montant facturat"
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.next_id_71
msgid "Financial Project Management"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,last_worked_invoiced_date:0
msgid "Date of Last Invoiced Cost"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_to_invoice:0
msgid "Uninvoiced Amount"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_all_pending
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all_pending
msgid "Pending Analytic Accounts"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_qtt_invoiced:0
msgid "Invoiced Hours"
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,real_margin:0
msgid "Real Margin"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_invoiced:0
msgid "Total customer invoiced amount for this account."
msgstr ""
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_month
msgid "Hours summary by month"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,real_margin_rate:0
msgid "Computes using the formula: (Real Margin / Total Costs) * 100."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_non_invoiced:0
msgid ""
"Number of hours (from journal of type 'general') that can be invoiced if you "
"invoice based on analytic account."
msgstr ""
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Analytic accounts"
msgstr "Compte analitic"
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_ca:0
msgid "Remaining Revenue"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_to_invoice:0
msgid ""
"If invoice from analytic account, the remaining amount you can invoice to "
"the customer based on the total costs."
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,revenue_per_hour:0
msgid "Computed using the formula: Invoiced Amount / Hours Tot."
msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,revenue_per_hour:0
msgid "Revenue per Hours (real)"
msgstr ""
#. module: account_analytic_analysis
#: field:account_analytic_analysis.summary.month,unit_amount:0
#: field:account_analytic_analysis.summary.user,unit_amount:0
msgid "Total Time"
msgstr "Durada totala"
#. module: account_analytic_analysis
#: field:account.analytic.account,month_ids:0
#: field:account_analytic_analysis.summary.month,month:0
msgid "Month"
msgstr "Mes"
#. module: account_analytic_analysis
#: field:account_analytic_analysis.summary.month,account_id:0
#: field:account_analytic_analysis.summary.user,account_id:0
msgid "Analytic Account"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_overpassed
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_managed_overpassed
msgid "Overpassed Accounts"
msgstr ""
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_hr_tree_invoiced_all
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_hr_tree_invoiced_all
msgid "All Uninvoiced Entries"
msgstr ""
#. module: account_analytic_analysis
#: help:account.analytic.account,total_cost:0
msgid ""
"Total of costs for this account. It includes real costs (from invoices) and "
"indirect costs, like time spent on timesheets."
msgstr ""

View File

@ -0,0 +1,64 @@
# Occitan (post 1500) translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-24 12:50+0000\n"
"PO-Revision-Date: 2010-03-12 13:37+0000\n"
"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-13 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_anglo_saxon
#: view:product.category:0
msgid " Accounting Property"
msgstr ""
#. module: account_anglo_saxon
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
msgid ""
"This module will support the Anglo-Saxons accounting methodology by \n"
" changing the accounting logic with stock transactions. The difference "
"between the Anglo-Saxon accounting countries \n"
" and the Rhine or also called Continental accounting countries is the "
"moment of taking the Cost of Goods Sold versus Cost of Sales. \n"
" Anglo-Saxons accounting does take the cost when sales invoice is "
"created, Continental accounting will take the cost at he moment the goods "
"are shipped.\n"
" This module will add this functionality by using a interim account, to "
"store the value of shipped goods and will contra book this interim account \n"
" when the invoice is created to transfer this amount to the debtor or "
"creditor account."
msgstr ""
#. module: account_anglo_saxon
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
msgid "Stock Account"
msgstr ""
#. module: account_anglo_saxon
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: account_anglo_saxon
#: field:product.category,property_account_creditor_price_difference_categ:0
#: field:product.template,property_account_creditor_price_difference:0
msgid "Price Difference Account"
msgstr ""
#. module: account_anglo_saxon
#: help:product.category,property_account_creditor_price_difference_categ:0
#: help:product.template,property_account_creditor_price_difference:0
msgid ""
"This account will be used to value price difference between purchase price "
"and cost price."
msgstr ""

View File

@ -0,0 +1,33 @@
# Occitan (post 1500) translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-12 13:29+0000\n"
"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-13 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_date_check
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: account_date_check
#: field:account.journal,allow_date:0
msgid "Allows date not in the period"
msgstr ""
#. module: account_date_check
#: model:ir.module.module,shortdesc:account_date_check.module_meta_information
msgid "Account Date check"
msgstr ""

View File

@ -34,6 +34,16 @@
'init_xml': ['auction_sequence.xml'],
'update_xml': [
'security/ir.model.access.csv',
'wizard/auction_lots_able_view.xml',
'wizard/auction_lots_enable_view.xml',
'wizard/auction_lots_make_invoice_buyer_view.xml',
'wizard/auction_lots_make_invoice_view.xml',
'wizard/auction_taken_view.xml',
'wizard/auction_lots_auction_move_view.xml',
'wizard/auction_pay_buy_view.xml',
'wizard/auction_payer_sel_view.xml',
'wizard/auction_lots_sms_send_view.xml',
'auction_view.xml',
'auction_report.xml',
'auction_wizard.xml'

View File

@ -478,13 +478,15 @@ class auction_lots(osv.osv):
result = [ (r['id'], str(r['obj_num'])+' - '+r['name']) for r in self.read(cr, user, ids, ['name','obj_num'])]
return result
def name_search(self, cr, user, name, args=[], operator='ilike', context={}):
def name_search(self, cr, user, name, args=None, operator='ilike', context={}):
if not args:
args = []
try:
ids = self.search(cr, user, [('obj_num','=',int(name))]+ args)
ids = self.search(cr, user, [('obj_num','=',int(name))] + args)
except:
ids = []
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args)
ids = self.search(cr, user, [('name',operator,name)] + args)
return self.name_get(cr, user, ids)
def _sum_taxes_by_type_and_id(self, taxes):

View File

@ -3,7 +3,8 @@
<data>
<menuitem name="Auction Management" id="auction_menu_root" icon="terp-purchase"/>
<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"/>
=======================================================
Auction Management/Configuration/artist
=======================================================
@ -203,6 +204,7 @@
<field name="lot_est2"/>
<field name="product_id"/>
<field name="state" readonly="1"/>
</form>
</field>
</record>
@ -277,7 +279,7 @@
<separator string="Description" colspan="4"/>
<field name="obj_desc" colspan="4" nolabel="1" select="2"/>
<field name="state" colspan="1" select="2"/>
<group col="4" colspan="2">
<group col="8" colspan="2">
<button name="button_bought" string="Sold" states="draft" type="object" icon="gtk-jump-to"/>
<button name="button_not_bought" string="Not sold" states="draft" type="object" icon="gtk-undo"/>
<button name="button_taken_away" string="Taken away" states="sold" type="object" icon="gtk-goto-last"/>
@ -330,7 +332,6 @@
<field name="date"/>
</tree>
</field>
</page>
<page string="Bids">
<field name="bid_lines" colspan="4" nolabel="1" editable="top">
@ -340,9 +341,7 @@
<field name="call"/>
</tree>
</field>
</page>
</notebook>
</form>
</field>

View File

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<openerp>
<data>
<!--<delete model="ir.actions.wizard" search="[('wiz_name','like','auction.lots.')]"/>-->
<!-- Following wizard is remaining to implement in osv_memory-->
<!--
<wizard string="Send to website"
model="auction.lots"
name="auction.lots.send.aie"
@ -20,45 +20,6 @@
multi="1"
id="wizard_map_user"/>
<wizard string="Change Auction Date"
model="auction.lots"
name="auction.lots.auction_move"
multi="1"
id="wizard_change_auction"/>
<!--wizard string="Pay objects of the seller"
model="auction.lots"
name="auction.pay.sel"
id="wizard_lots_pay"/-->
<wizard string="Pay objects of the buyer"
model="auction.lots"
name="auction.pay.buy"
id="wizard_pay"/>
<wizard
string="Gestion emporte"
model="auction.dates"
name="auction.taken"
multi="1"
id="wizard_emporte"/>
<menuitem name="Tools Bar Codes"
id="auction_outils_menu"
parent="auction_menu_root" sequence="5"
/>
<menuitem name="Deliveries Management"
action="wizard_emporte"
type="wizard"
id="menu_wizard_emporte"
parent="auction_outils_menu"
/>
<!--wizard string="Cancel payment"
model="auction.lots"
name="auction.lots.cancel"
multi="1"
id="wizard_cancel_pay"/-->
<wizard string="Numerotation (per lot)"
model="auction.lots"
@ -72,56 +33,13 @@
multi="1"
id="wizard_numerotate_automatic"/>
<wizard string="SMS Send"
model="auction.lots"
name="auction.lots.sms_send"
multi="1"
id="wizard_sms"/>
<!--wizard string="Invoice"
model="auction.lots"
name="auction.lots.invoice"
multi="1"
id="wizard_invoicing"/-->
<wizard string="Invoice Seller objects"
model="auction.lots"
name="auction.lots.make_invoice"
multi="1"
id="wizard_invoice"/>
<wizard string="Invoice Buyer objects"
model="auction.lots"
name="auction.lots.make_invoice_buyer"
id="wizard_invoice_buyer1"/>
<wizard string="Unmark as taken away"
model="auction.lots"
name="auction.lots.enable"
multi="1"
id="auction_wizard_enable_taken"/>
<wizard string="Mark as taken away"
model="auction.lots"
name="auction.lots.able"
multi="1"
id="auction_wizard_able_taken"/>
<wizard
id="auction_catalog_flagy"
string="Auction Catalog Flagey"
model="auction.dates"
name="auction.catalog.flagey"
keyword="client_print_multi"/>
<wizard string="Mark as paid for seller"
model="auction.lots"
name="auction.payer.sel"
multi="1"
id="auction_wizard_payer_sel"/>
-->
</data>
</openerp>

View File

@ -19,24 +19,27 @@
#
##############################################################################
import wizard_aie_send
import wizard_aie_send_result
import wizard_lots_buyer_map
import wizard_lots_cancel
import wizard_lots_invoice
import wizard_lots_numerotate
import wizard_lots_pay
import wizard_pay
import wizard_lots_sms
import wizard_lot_date_move
import wizard_auction_journal
import wizard_auction_invoice_buyer
import wizard_transfer_unsold_object
import auction_wizard_enable_taken
import auction_wizard_able_taken
import auction_catalog_flagey
#import wizard_lots_barcode
import wizard_emporte
import wizard_payer
#import wizard_aie_send
#import wizard_aie_send_result
#import wizard_lots_buyer_map
#import wizard_lots_cancel
#import wizard_lots_invoice
#import wizard_lots_numerotate
#import wizard_lots_pay
#import wizard_pay
#import wizard_lot_date_move
#import wizard_transfer_unsold_object
#import auction_catalog_flagey
import auction_lots_able
import auction_lots_enable
import auction_lots_make_invoice_buyer
import auction_lots_make_invoice
import auction_taken
import auction_lots_auction_move
import auction_pay_buy
import auction_payer_sel
import auction_lots_sms_send
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_lots_able(osv.osv_memory):
_name = "auction.lots.able"
_description = "Lots able"
def confirm_able(self, cr, uid, ids, context={}):
"""
This function Update auction lots object and set taken away field true.
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of auction lots ables IDs.
"""
self.pool.get('auction.lots').write(cr, uid, context['active_ids'], {'ach_emp':True})
return {}
auction_lots_able()

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_able" model="ir.ui.view">
<field name="name">auction.lots.able.form</field>
<field name="model">auction.lots.able</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Confirm">
<group colspan="4" >
<separator string="Confirmation set taken away" colspan="4"/>
<newline/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-goto-last" string="Able Taken away" name="confirm_able" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_lots_able" model="ir.actions.act_window">
<field name="name">Mark as taken away</field>
<field name="res_model">auction.lots.able</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_lots_able"/>
<field name="target">new</field>
<field name="context">{'record_id' : active_id}</field>
</record>
<record id="auction_lots_able_values" model="ir.values">
<field name="model_id" ref="auction.model_auction_lots" />
<field name="object" eval="1" />
<field name="name">Mark as taken away</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_auction_lots_able'))" />
<field name="key">action</field>
<field name="model">auction.lots</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,88 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_lots_auction_move(osv.osv_memory):
_name = "auction.lots.auction.move"
_description = "Auction move "
_columns= {
'auction_id':fields.many2one('auction.dates', 'Auction Date', required=True),
}
def _top(self, cr, uid, ids, context={}):
refs = self.pool.get('auction.lots')
rec_ids = refs.browse(cr, uid, context['active_ids'])
for rec in rec_ids:
if not rec.auction_id:
raise osv.except_osv('Error !', 'You can not move a lot that has no auction date')
return {}
def auction_move_set(self, cr, uid, ids, context={}):
"""
This Function update auction date on auction lots to given auction date.
erase the auction lots's object adjudication price and its buyer and change state to draft.
create new entry in auction lot history.
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of auction lots auction moves IDs.
"""
refs = self.pool.get('auction.lots')
auction_bid_line_obj = self.pool.get('auction.bid_line')
auction_lot_history_obj = self.pool.get('auction.lot.history')
auction_lots_obj = self.pool.get('auction.lots')
for datas in self.read(cr, uid, ids):
if not (datas['auction_id'] and len(context['active_ids'])) :
return {}
rec_ids = refs.browse(cr, uid, context['active_ids'])
line_ids = auction_bid_line_obj.search(cr, uid, [('lot_id', 'in', context['active_ids'])])
# pooler.get_pool(cr.dbname).get('auction.bid_line').unlink(cr, uid, line_ids)
for rec in rec_ids:
new_id = auction_lot_history_obj.create(cr, uid, {
'auction_id': rec.auction_id.id,
'lot_id': rec.id,
'price': rec.obj_ret
})
up_auction = auction_lots_obj.write(cr, uid, [rec.id], {
'auction_id':datas['auction_id'],
'obj_ret': None,
'obj_price': None,
'ach_login': None,
'ach_uid': None,
'ach_inv_id': None,
'sel_inv_id': None,
'obj_num': None,
'state': 'draft'})
return {}
auction_lots_auction_move()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_auction_move" model="ir.ui.view">
<field name="name">auction.lots.auction.move.form</field>
<field name="model">auction.lots.auction.move</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Change Auction Date">
<group colspan="4" >
<label string="Warning, this will erase the object adjudication price and its buyer !" colspan="2"/>
<newline/>
<field name="auction_id"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-redo" string="Move to Auction date" name="auction_move_set" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_lots_auction_move" model="ir.actions.act_window">
<field name="name">Change Auction Date</field>
<field name="res_model">auction.lots.auction.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_lots_auction_move"/>
<field name="target">new</field>
<field name="context">{'record_id' : active_id}</field>
</record>
<record id="auction_lots_auction_move_values" model="ir.values">
<field name="model_id" ref="auction.model_auction_lots" />
<field name="object" eval="1" />
<field name="name">Change Auction Date</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_auction_lots_auction_move'))" />
<field name="key">action</field>
<field name="model">auction.lots</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_lots_enable(osv.osv_memory):
_name = "auction.lots.enable"
_description = "Lots Enable"
_columns= {
'confirm_en':fields.integer('Catalog Number')
}
def confirm_enable(self, cr, uid, ids, context={}):
"""
This function Update auction lots object and set taken away field False.
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of auction lots enables IDs.
"""
self.pool.get('auction.lots').write(cr, uid, context['active_id'], {'ach_emp':False})
return {}
auction_lots_enable()

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_enable" model="ir.ui.view">
<field name="name">auction.lots.enable.form</field>
<field name="model">auction.lots.enable</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Confirm">
<group colspan="4" >
<separator string="Confirmation enable taken away" colspan="4"/>
<newline/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-goto-last" string="Enable Taken away" name="confirm_enable" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_lots_enable" model="ir.actions.act_window">
<field name="name">Unmark as taken away</field>
<field name="res_model">auction.lots.enable</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_lots_enable"/>
<field name="target">new</field>
<field name="context">{'record_id' : active_id}</field>
</record>
<record id="auction_lots_enable_values" model="ir.values">
<field name="model_id" ref="auction.model_auction_lots" />
<field name="object" eval="1" />
<field name="name">Unmark as taken away</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_auction_lots_enable'))" />
<field name="key">action</field>
<field name="model">auction.lots</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,94 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_lots_make_invoice(osv.osv_memory):
def _value_amount(self, cr, uid, context={}):
"""
For Amount default value
@return:default auction lots amount value in amount fields.
"""
lots= self.pool.get('auction.lots').browse(cr, uid, context['active_ids'])
amount_total=0.0
for lot in lots:
amount_total+=lot.seller_price
return amount_total
def _value_object(self, cr, uid, context={}):
"""
For object default value.
@return:length of id in Object field.
"""
object = len(context['active_ids'])
return object
def makeInvoices(self, cr, uid, ids, context):
"""
seller invoice :Create an invoice.
@param cr: the current row, from the database cursor.
@param uid: the current users ID for security checks.
@param ids: List of Auction lots make invoices IDs
@return: dictionary of account invoice form.
"""
order_obj = self.pool.get('auction.lots')
mod_obj = self.pool.get('ir.model.data')
for data in self.read(cr, uid, ids):
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
newinv = []
ids = order_obj.seller_trans_create(cr, uid, context['active_ids'], context)
cr.commit()
return {
'domain': "[('id','in', ["+','.join(map(str, ids))+"])]",
'name': 'Seller invoices',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.invoice',
'view_id': False,
'context': "{'type':'out_refund'}",
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}
_name = "auction.lots.make.invoice"
_description = "Make invoice"
_columns= {
'amount': fields.float('Invoiced Amount', required =True, readonly=True),
'objects':fields.integer('# of objects', required =True, readonly=True),
'number':fields.char('Invoice Number', size=64),
}
_defaults={
'amount':_value_amount,
'objects':_value_object,
'number':lambda *a: False,
}
auction_lots_make_invoice()

View File

@ -0,0 +1,110 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_lots_make_invoice_buyer(osv.osv_memory):
def _value_amount(self, cr, uid, context={}):
"""
For Amount default value
@return:default auction lots amount value in amount fields.
"""
lots= self.pool.get('auction.lots').browse(cr, uid, context['active_ids'])
amount_total=0.0
for lot in lots:
amount_total+=lot.buyer_price
return amount_total
def _value_object(self, cr, uid, context={}):
"""
For object default value.
@return:length of id in Object field.
"""
object = len(context['active_ids'])
return object
def _value_buyer_id(self, cr, uid, context={}):
"""
For default buyer id value
@return:auction lots buyer id in buyer id field.
"""
lots= self.pool.get('auction.lots').browse(cr, uid, context['active_ids'])
for lot in lots:
buyer=lot and lot.ach_uid.id or False
return buyer
def makeInvoices(self, cr, uid, ids, context):
"""
Create an invoice for selected lots (IDS) to BUYER_ID .
@param cr: the current row, from the database cursor.
@param uid: the current users ID for security checks.
@param ids: List of Auction lots make invoice buyers IDs
@return: dictionary of account invoice form.
"""
newinv = []
order_obj = self.pool.get('auction.lots')
mod_obj = self.pool.get('ir.model.data')
for data in self.read(cr, uid, ids):
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
lots = order_obj.browse(cr, uid, context['active_ids'])
invoice_number = data['number']
for lot in lots:
up_auction = order_obj.write(cr, uid, [lot.id], {'ach_uid':data['buyer_id']})
ids = order_obj.lots_invoice(cr, uid, context['active_ids'], context, data['number'])
cr.commit()
return {
'domain': "[('id','in', ["+','.join(map(str, ids))+"])]",
'name': 'Buyer invoices',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.invoice',
'view_id': False,
'context': "{'type':'in_refund'}",
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}
_name = "auction.lots.make.invoice.buyer"
_description = "Make invoice buyer "
_columns= {
'amount': fields.float('Invoiced Amount', required =True, readonly=True),
'objects':fields.integer('# of objects', required =True, readonly=True),
'number':fields.char('Invoice Number', size=64),
'buyer_id':fields.many2one('res.partner', 'Buyer', required=True),
}
_defaults={
'amount':_value_amount,
'objects':_value_object,
'number':lambda *a: False,
'buyer_id':_value_buyer_id
}
auction_lots_make_invoice_buyer()

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_make_invoice_buyer" model="ir.ui.view">
<field name="name">auction.lots.make.invoice.buyer.form</field>
<field name="model">auction.lots.make.invoice.buyer</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Paid">
<group colspan="4" >
<field name="amount"/>
<field name="objects"/>
<field name="number"/>
<label string="(Keep empty for automatic number)" colspan="2"/>
<field name="buyer_id"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Create invoices" name="makeInvoices" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_lots_make_invoice_buyer" model="ir.actions.act_window">
<field name="name">Invoice Buyer objects</field>
<field name="res_model">auction.lots.make.invoice.buyer</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_lots_make_invoice_buyer"/>
<field name="target">new</field>
<field name="context">{'record_id' : active_id}</field>
</record>
<record id="auction_lots_make_invoice_buyer_values" model="ir.values">
<field name="model_id" ref="auction.model_auction_lots" />
<field name="object" eval="1" />
<field name="name">Invoice Buyer objects</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_auction_lots_make_invoice_buyer'))" />
<field name="key">action</field>
<field name="model">auction.lots</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_make_invoice" model="ir.ui.view">
<field name="name">auction.lots.make.invoice.form</field>
<field name="model">auction.lots.make.invoice</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Paid">
<group colspan="4" >
<field name="amount"/>
<field name="objects"/>
<field name="number" colspan="3"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Create invoices" name="makeInvoices" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_lots_make_invoice" model="ir.actions.act_window">
<field name="name">Invoice Seller objects</field>
<field name="res_model">auction.lots.make.invoice</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_lots_make_invoice"/>
<field name="target">new</field>
<field name="context">{'record_id' : active_id}</field>
</record>
<record id="auction_lots_make_invoice_values" model="ir.values">
<field name="model_id" ref="auction.model_auction_lots" />
<field name="object" eval="1" />
<field name="name">Invoice Seller objects</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_auction_lots_make_invoice'))" />
<field name="key">action</field>
<field name="model">auction.lots</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,79 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_lots_sms_send(osv.osv_memory):
_name = "auction.lots.sms.send"
_description = "Sms send "
_columns= {
'app_id':fields.char('API ID', size=64, required=True),
'user':fields.char('Login', size=64, required=True),
'password':fields.char('Password', size=64, required=True),
'text':fields.text('SMS Message', required=True)
}
def sms_send(self, cr, uid, ids, context):
"""
to send sms
@param cr: the current row, from the database cursor.
@param uid: the current users ID for security checks.
@param ids: the ID or list of IDs
@param context: A standard dictionary
@return: number indicating the acknowledgement
"""
lot_obj = self.pool.get('auction.lots')
partner_obj = self.pool.get('res.partner')
partner_address_obj = self.pool.get('res.partner.address')
for datas in self.read(cr, uid, ids):
lots = lot_obj.read(cr, uid, context['active_ids'], ['obj_num','obj_price','ach_uid'])
print "lots",lots, [l['ach_uid'][0] for l in lots if l['ach_uid']]
res = partner_obj.read(cr, uid, [l['ach_uid'][0] for l in lots if l['ach_uid']], ['gsm'], context)
nbr = 0
for r in res:
add = partner_obj.address_get(cr, uid, [r['id']])['default']
addr = partner_address_obj.browse(cr, uid, add)
to = addr.mobile
if to:
tools.smssend(data['user'], data['password'], data['app_id'], unicode(data['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
if to:
tools.smssend(data['user'], data['password'], data['app_id'], unicode(data['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
#
auction_lots_sms_send()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_lots_sms_send" model="ir.ui.view">
<field name="name">auction.lots.sms.send.form</field>
<field name="model">auction.lots.sms.send</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="SMS - Gateway: clickatell','Bulk SMS send">
<group colspan="4" >
<separator string="SMS - Gateway: clickatell','Bulk SMS send" colspan="4"/>
<field name="app_id"/>
<newline/>
<field name="user"/>
<field name="password"/>
<newline/>
<field name="text" colspan="3"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-go-back" string="Send SMS" name="sms_send" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_lots_sms_send" model="ir.actions.act_window">
<field name="name">SMS Send</field>
<field name="res_model">auction.lots.sms.send</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_lots_sms_send"/>
<field name="target">new</field>
<field name="context">{'record_id' : active_id}</field>
</record>
<record id="auction_lots_sms_send_values" model="ir.values">
<field name="model_id" ref="auction.model_auction_lots" />
<field name="object" eval="1" />
<field name="name">SMS Send</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_auction_lots_sms_send'))" />
<field name="key">action</field>
<field name="model">auction.lots</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,117 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_pay_buy(osv.osv_memory):
def _start(self, cr, uid, context):
rec = self.pool.get('auction.lots').browse(cr, uid, context['active_ids'], context)
amount1 = 0.0
for r in rec:
amount1+= r.buyer_price
if r.is_ok:
raise osv.except_osv('Error !', 'Some lots of the selection are already paid.')
return amount1
def _value_buyer_id(self, cr, uid, context={}):
"""
For default buyer id value
@return:auction lots buyer id in buyer id field.
"""
lots= self.pool.get('auction.lots').browse(cr, uid, context['active_ids'])
for lot in lots:
buyer=lot and lot.ach_uid.id or False
return buyer
def pay_and_reconcile(self, cr, uid, ids, context):
"""
Pay and Reconcile
@param cr: the current row, from the database cursor.
@param uid: the current users ID for security checks.
@param ids: the ID or list of IDs
@param context: A standard dictionary
@return:
"""
lot_obj = self.pool.get('auction.lots')
bank_statement_line_obj = self.pool.get('account.bank.statement.line')
for datas in self.read(cr, uid, ids):
if not abs(datas['total'] - (datas['amount'] + datas['amount2'] + datas['amount3'])) <0.01:
rest = datas['total']-(datas['amount'] + datas['amount2'] + datas['amount3'])
raise osv.except_osv('Payment aborted !', 'You should pay all the total: "%.2f" are missing to accomplish the payment.' %(round(rest, 2)))
lots = lot_obj.browse(cr, uid, context['active_ids'], context)
ref_bk_s = bank_statement_line_obj
for lot in lots:
if datas['buyer_id']:
lot_obj.write(cr, uid, [lot.id], {'ach_uid':datas['buyer_id']})
if not lot.auction_id:
raise osv.except_osv('Error !', 'No auction date for "%s": Please set one.'%(lot.name))
lot_obj.write(cr, uid, [lot.id], {'is_ok':True})
for st, stamount in [('statement_id1', 'amount'), ('statement_id2', 'amount2'), ('statement_id3', 'amount3')]:
if datas[st]:
new_id = ref_bk_s.create(cr, uid, {
'name':'Buyer:'+ str(lot.ach_login or '')+', auction:'+ lots[0].auction_id.name,
'date': time.strftime('%Y-%m-%d'),
'partner_id': datas['buyer_id'] or False,
'type':'customer',
'statement_id': datas[st],
'account_id': lot.auction_id.acc_income.id,
'amount': datas[stamount]
})
for lot in lots:
lot_obj.write(cr, uid, [lot.id], {'statement_id':[(4, new_id)]})
return {}
_name = "auction.pay.buy"
_description = "Pay buy"
_columns= {
'amount': fields.float('Amount paid', digits= (16, int(tools.config['price_accuracy']))),
'buyer_id':fields.many2one('res.partner', 'Buyer'),
'statement_id1':fields.many2one('account.bank.statement', 'Statement', required=True),
'amount2': fields.float('Amount paid', digits= (16, int(tools.config['price_accuracy']))),
'statement_id2':fields.many2one('account.bank.statement', 'Statement'),
'amount3': fields.float('Amount paid', digits = (16, int(tools.config['price_accuracy']))),
'statement_id3':fields.many2one('account.bank.statement', 'Statement'),
'total': fields.float('Amount paid', digits = (16, int(tools.config['price_accuracy'])), readonly =True),
}
_defaults={
'amount' : _start,
'total' : _start,
'buyer_id' : _value_buyer_id
}
auction_pay_buy()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_pay_buy" model="ir.ui.view">
<field name="name">auction.pay.buy.form</field>
<field name="model">auction.pay.buy</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Pay objects">
<group colspan="4" >
<field name="amount"/>
<field name="statement_id1" domain="[('state','=','draft')]"/>
<field name="amount2"/>
<field name="statement_id2" domain="[('state','=','draft')]"/>
<field name="amount3"/>
<field name="statement_id3" domain="[('state','=','draft')]"/>
<newline/>
<field name="buyer_id"/>
<field name="total"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-yes" string="Pay" name="pay_and_reconcile" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_pay_buy" model="ir.actions.act_window">
<field name="name">Pay objects of the buyer</field>
<field name="res_model">auction.pay.buy</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_pay_buy"/>
<field name="target">new</field>
<field name="context">{'record_id' : active_id}</field>
</record>
<record id="auction_pay_buy_values" model="ir.values">
<field name="model_id" ref="auction.model_auction_lots" />
<field name="object" eval="1" />
<field name="name">Pay objects of the buyer</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_auction_pay_buy'))" />
<field name="key">action</field>
<field name="model">auction.lots</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,62 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_pay_sel(osv.osv_memory):
_name = "auction.pay.sel"
_description = "Pay Invoice"
_columns= {
'amount': fields.float('Amount paid', digits= (16, int(tools.config['price_accuracy'])), required=True),
'dest_account_id':fields.many2one('account.account', 'Payment to Account', required=True, domain= [('type', '=', 'cash')]),
'journal_id':fields.many2one('account.journal', 'Journal', required=True),
'period_id':fields.many2one('account.period', 'Period', required=True),
}
def pay_and_reconcile(self, cr, uid, ids, context):
"""
Pay and Reconcile
@param cr: the current row, from the database cursor.
@param uid: the current users ID for security checks.
@param ids: the ID or list of IDs
@param context: A standard dictionary
@return:
"""
lot = self.pool.get('auction.lots').browse(cr, uid, context['active_id'], context)
invoice_obj = self.pool.get('account.invoice')
for datas in self.read(cr, uid, ids):
account_id = datas.get('writeoff_acc_id', False)
period_id = datas.get('period_id', False)
journal_id = datas.get('journal_id', False)
if lot.sel_inv_id:
p = invoice_obj.pay_and_reconcile(['lot.sel_inv_id.id'], datas['amount'], datas['dest_account_id'], journal_id, account_id, period_id, journal_id, context)
# lots.sel_inv_id.pay_and_reconcile(cr,uid,data[id], form['amount'], form['dest_account_id'], journal_id, account_id, period_id, journal_id, context)
return {}
auction_pay_sel()

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_pay_sel" model="ir.ui.view">
<field name="name">auction.pay.sel.form</field>
<field name="model">auction.pay.sel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Pay invoice">
<group colspan="4" >
<field name="amount"/>
<field name="dest_account_id"/>
<field name="journal_id"/>
<field name="period_id"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-yes" string="Pay" name="pay_and_reconcile" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_pay_sel" model="ir.actions.act_window">
<field name="name">Pay objects of the seller</field>
<field name="res_model">auction.pay.sel</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_pay_sel"/>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -19,43 +19,42 @@
#
##############################################################################
import wizard
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
take_form = """<?xml version="1.0"?>
<form title="Confirm">
<separator string="Confirmation set taken away" colspan="4"/>
<newline/>
</form>
"""
import time
import tools
import wizard
take_fields = {
# 'confirm_en': {'string':'Catalog Number', 'type':'integer'},
}
def _confirm_able(self,cr,uid,data,context={}):
res={}
pool = pooler.get_pool(cr.dbname)
pool.get('auction.lots').write(cr,uid,data['ids'],{'ach_emp':True})
return {}
class able_take_away(wizard.interface):
states = {
'init' : {
'actions' : [],
'result' : {
'type' : 'form',
'arch' : take_form,
'fields' : take_fields,
'state' : [('end', 'Cancel'),('go', 'Able Taken away')]}
},
'go' : {
'actions' : [_confirm_able],
'result' : {'type' : 'state', 'state' : 'end'}
},
}
able_take_away('auction.lots.able')
class auction_payer(osv.osv_memory):
_name = "auction.payer"
_description = "Auction payer"
def payer(self, cr, uid, ids, context):
self.pool.get('auction.lots').write(cr, uid, context['active_ids'], {'is_ok':True, 'state':'paid'})
return {}
auction_payer()
class auction_payer_sel(osv.osv_memory):
"""
For Mark as payment for seller
"""
_name = "auction.payer.sel"
_description = "Auction payment for seller"
def payer_sel(self, cr, uid, ids, context):
"""
This function Update auction lots object and seller paid true.
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of auction payer sels IDs.
"""
self.pool.get('auction.lots').write(cr, uid, context['active_ids'], {'paid_vnd':True})
return {}
auction_payer_sel()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_payer" model="ir.ui.view">
<field name="name">auction.payer.form</field>
<field name="model">auction.payer</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Check payment for buyer">
<separator string="" colspan="4" />
<group colspan="4" col="2">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon = "gtk-yes" string="Pay" name="payer" type="object"/>
</group>
</form>
</field>
</record>
<record id="view_auction_payer_sel" model="ir.ui.view">
<field name="name">auction.payer.sel.form</field>
<field name="model">auction.payer.sel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Check payment for seller">
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-yes" string="Pay" name="payer_sel" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_auction_payer_sel" model="ir.actions.act_window">
<field name="name">Mark as paid for seller</field>
<field name="res_model">auction.payer.sel</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_payer_sel"/>
<field name="target">new</field>
<field name="context">{'record_id' : active_id}</field>
</record>
<record id="auction_payer_sel_values" model="ir.values">
<field name="model_id" ref="auction.model_auction_lots" />
<field name="object" eval="1" />
<field name="name">Mark as paid for seller</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_auction_payer_sel'))" />
<field name="key">action</field>
<field name="model">auction.lots</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
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):
"""
Auction lots taken.
"""
_name = "auction.taken"
_description = "Auction taken"
_columns = {
'lot_ids':fields.many2many('auction.lots', 'auction_taken_rel', 'taken_id', 'lot_id', 'Lots Emportes'),
}
def _to_xml(s):
return s.replace('&','&amp;').replace('<','&lt;').replace('>','&gt;')
def process(self, cr, uid, ids, context):
"""
Update Auction lots state to taken_away.
@param cr: the current row, from the database cursor.
@param uid: the current users ID for security checks.
@param ids: List of Auction takens IDs
@return: dictionary of lot_ids fields with empty list
"""
lot_obj = self.pool.get('auction.lots')
for data in self.read(cr, uid, ids):
if data['lot_ids']:
lot_obj.write(cr, uid, data['lot_ids'], {'state':'taken_away'})
return {'lot_ids': []}
auction_taken()

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_auction_taken" model="ir.ui.view">
<field name="name">auction.taken.form</field>
<field name="model">auction.taken</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Mark Lots">
<group colspan="4" >
<label string="Select lots which are Sold" colspan="4"/>
<field name="lot_ids" nolabel="1" colspan="4" domain="[('state','=','sold')]"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-ok" string="OK" name="process" type="object" />
</group>
</form>
</field>
</record>
<record id="action_auction_taken" model="ir.actions.act_window">
<field name="name">Gestion emporte</field>
<field name="res_model">auction.taken</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_auction_taken"/>
<field name="target">new</field>
</record>
<!-- <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"
/> -->
</data>
</openerp>

View File

@ -1,61 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import pooler
#field name="confirm_en"/>
take_form = """<?xml version="1.0"?>
<form title="Confirm">
<separator string="Confirmation enable taken away" colspan="4"/>
<newline/>
</form>
"""
take_fields = {
'confirm_en': {'string':'Catalog Number', 'type':'integer'},
}
def _confirm_enable(self,cr,uid,data,context={}):
pool = pooler.get_pool(cr.dbname)
pool.get('auction.lots').write(cr,uid,data['ids'],{'ach_emp':False})
return {}
class enable_take_away(wizard.interface):
states = {
'init' : {
'actions' : [],
'result' : {
'type' : 'form',
'arch' : take_form,
'fields' : take_fields,
'state' : [ ('end', 'Cancel'),('go', 'Enable Taken away')]}
},
'go' : {
'actions' : [_confirm_enable],
'result' : {'type' : 'state', 'state' : 'end'}
},
}
enable_take_away('auction.lots.enable')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,111 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import pooler
invoice_form = '''<?xml version="1.0"?>
<form title="Paid ?">
<field name="amount"/>
<field name="objects"/>
<field name="number"/>
<label string="(Keep empty for automatic number)" colspan="2"/>
<field name="buyer_id"/>
</form>'''
invoice_fields = {
'amount': {'string':'Invoiced Amount', 'type':'float', 'required':True, 'readonly':True},
'objects': {'string':'# of objects', 'type':'integer', 'required':True, 'readonly':True},
'number': {'string':'Invoice Number', 'type':'char'},
'buyer_id':{'string': 'Buyer', 'type': 'many2one', 'relation':'res.partner'}
}
def _values(self,cr,uid, datas,context={}):
pool = pooler.get_pool(cr.dbname)
lots= pool.get('auction.lots').browse(cr,uid,datas['ids'])
# price = 0.0
amount_total=0.0
# pt_tax=pooler.get_pool(cr.dbname).get('account.tax')
for lot in lots:
buyer=lot and lot.ach_uid.id or False
amount_total+=lot.buyer_price
# taxes = lot.product_id.taxes_id
# if lot.author_right:
# taxes.append(lot.author_right)
# if lot.auction_id:
# taxes += lot.auction_id.buyer_costs
# tax=pt_tax.compute(cr,uid,taxes,lot.obj_price,1)
# for t in tax:
# amount_total+=t['amount']
# amount_total+=lot.obj_price
# up_auction=pooler.get_pool(cr.dbname).get('auction.lots').write(cr,uid,[lot.id],{'ach_uid':datas['form']['buyer_id']})
invoice_number = False
return {'objects':len(datas['ids']), 'amount':amount_total, 'number':invoice_number,'buyer_id':buyer}
def _makeInvoices(self, cr, uid, data, context):
newinv = []
pool = pooler.get_pool(cr.dbname)
order_obj = pool.get('auction.lots')
mod_obj = pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
lots= order_obj.browse(cr,uid,data['ids'])
invoice_number=data['form']['number']
for lot in lots:
up_auction=pooler.get_pool(cr.dbname).get('auction.lots').write(cr,uid,[lot.id],{'ach_uid':data['form']['buyer_id']})
ids = order_obj.lots_invoice(cr, uid, data['ids'],context,data['form']['number'])
# ids = order_obj.lots_invoice(cr, uid, data['ids'],context,invoice_number)
cr.commit()
return {
'domain': "[('id','in', ["+','.join(map(str, ids))+"])]",
'name': 'Buyer invoices',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.invoice',
'view_id': False,
'context': "{'type':'in_refund'}",
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}
return {}
class make_invoice(wizard.interface):
states = {
'init' : {
'actions' : [_values],
'result' : {'type' : 'form',
'arch' : invoice_form,
'fields' : invoice_fields,
'state' : [('end', 'Cancel'),('invoice', 'Create invoices')]}
},
'invoice' : {
'actions' : [],
'result' : {'type' : 'action',
'action' : _makeInvoices}
},
}
make_invoice("auction.lots.make_invoice_buyer")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,105 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import pooler
invoice_form = '''<?xml version="1.0"?>
<form title="Paid ?">
<field name="amount"/>
<field name="objects"/>
<field name="number" colspan="3"/>
</form>'''
invoice_fields = {
'amount': {'string':'Invoiced Amount', 'type':'float', 'required':True, 'readonly':True},
'objects': {'string':'# of objects', 'type':'integer', 'required':True, 'readonly':True},
'number': {'string':'Invoice Number', 'type':'integer'},
}
def _values(self,cr,uid, datas,context={}):
lots= pooler.get_pool(cr.dbname).get('auction.lots').browse(cr,uid,datas['ids'])
# service = netsvc.LocalService("object_proxy")
# lots = service.execute(cr,uid, 'auction.lots', 'read', datas['ids'])
# auction = service.execute(cr,uid, 'auction.dates', 'read', [lots[0]['auction_id'][0]])[0]
price = 0.0
amount_total=0.0
pt_tax=pooler.get_pool(cr.dbname).get('account.tax')
for lot in lots:
# taxes = lot.product_id.taxes_id
# if lot.bord_vnd_id.tax_id:
# taxes.append(lot.bord_vnd_id.tax_id)
# if lot.auction_id:
# taxes += lot.auction_id.seller_costs
# tax=pt_tax.compute(cr,uid,taxes,lot.obj_price,1)
# for t in tax:
# amount_total+=t['amount']
# amount_total+=lot.obj_price
amount_total+=lot.seller_price
#TODO: recuperer id next invoice (de la sequence)???
invoice_number = False
return {'objects':len(datas['ids']), 'amount':amount_total, 'number':invoice_number}
def _makeInvoices(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
order_obj = pool.get('auction.lots')
mod_obj = pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
newinv = []
ids = order_obj.seller_trans_create(cr, uid, data['ids'],context)
cr.commit()
return {
'domain': "[('id','in', ["+','.join(map(str, ids))+"])]",
'name': 'Seller invoices',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.invoice',
'view_id': False,
'context': "{'type':'out_refund'}",
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}
return {}
class make_invoice(wizard.interface):
states = {
'init' : {
'actions' : [_values],
'result' : {'type' : 'form',
'arch' : invoice_form,
'fields' : invoice_fields,
'state' : [('end', 'Cancel'),('invoice', 'Create invoices')]}
},
'invoice' : {
'actions' : [_makeInvoices],
'result' : {'type' : 'action',
'action' : _makeInvoices,
'state' : 'end'}
},
}
make_invoice("auction.lots.make_invoice")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,73 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import pooler
from tools.misc import UpdateableStr
# Dossier
_lot_arch = """<?xml version="1.0"?>
<form string="Mark Lots" height="500" width="1000">
<label string="Select lots which are Sold" colspan="4"/>
<field name="lot_ids" nolabel="1" colspan="4" domain="[('state','=','sold')]"/>
</form>
"""
_lot_fields = {
'lot_ids': {'string':'Lots Emportes','relation':'auction.lots','type':'many2many'}
}
def _to_xml(s):
return s.replace('&','&amp;').replace('<','&lt;').replace('>','&gt;')
def _process(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
lot_obj = pool.get('auction.lots')
if data['form']['lot_ids']:
lot_obj.write(cr, uid, data['form']['lot_ids'][0][2], {'state':'taken_away'})
return {'lot_ids': []}
class wizard_reprint(wizard.interface):
states = {
'valid': {
'actions': [_process],
'result': {'type':'state', 'state':'init'}
},
'init': {
'actions': [],
'result': {
'type':'form',
'arch': _lot_arch,
'fields': _lot_fields,
'state': [
('valid',' OK ')
],
}
}
}
wizard_reprint('auction.taken')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,96 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import pooler
import sql_db
auction_move = '''<?xml version="1.0"?>
<form string="Change Auction Date">
<group col="1" colspan="2">
<label string="Warning, this will erase the object adjudication price and its buyer !" colspan="2"/>
</group>
<newline/>
<field name="auction_id"/>
</form>'''
auction_move_fields = {
'auction_id': {'string':'Auction Date', 'type':'many2one', 'required':True, 'relation':'auction.dates'},
}
#def _auction_move_set(self, uid, datas):
# if datas['form']['auction_id']:
# cr = sql_db.db.cursor()
# cr.execute('update auction_lots set auction_id=%s, obj_price=NULL, ach_login=NULL, ach_uid=NULL, ach_pay_id=NULL, ach_inv_id=NULL, state=%s where id in ('+','.join(map(str, datas['ids']))+')', (str(datas['form']['auction_id']), 'draft'))
# cr.execute('delete from auction_bid_line where lot_id in ('+','.join(map(str, datas['ids']))+')')
# cr.commit()
# cr.close()
# return {}
def _top(self,cr,uid,datas,context={}):
refs = pooler.get_pool(cr.dbname).get('auction.lots')
rec_ids = refs.browse(cr,uid,datas['ids'])
for rec in rec_ids:
if not rec.auction_id:
raise wizard.except_wizard('Error !','You can not move a lot that has no auction date')
return {}
def _auction_move_set(self,cr,uid,datas,context={}):
if not (datas['form']['auction_id'] and len(datas['ids'])) :
return {}
refs = pooler.get_pool(cr.dbname).get('auction.lots')
rec_ids = refs.browse(cr,uid,datas['ids'])
line_ids= pooler.get_pool(cr.dbname).get('auction.bid_line').search(cr,uid,[('lot_id','in',datas['ids'])])
# pooler.get_pool(cr.dbname).get('auction.bid_line').unlink(cr, uid, line_ids)
for rec in rec_ids:
new_id=pooler.get_pool(cr.dbname).get('auction.lot.history').create(cr,uid,{
'auction_id':rec.auction_id.id,
'lot_id':rec.id,
'price': rec.obj_ret
})
up_auction=pooler.get_pool(cr.dbname).get('auction.lots').write(cr,uid,[rec.id],{
'auction_id':datas['form']['auction_id'],
'obj_ret':None,
'obj_price':None,
'ach_login':None,
'ach_uid':None,
'ach_inv_id':None,
'sel_inv_id':None,
'obj_num':None,
'state':'draft'})
return {}
class wiz_auc_lots_auction_move(wizard.interface):
states = {
'init': {
'actions': [_top],
'result': {'type': 'form', 'arch':auction_move, 'fields': auction_move_fields, 'state':[('set_date', 'Move to Auction date'),('end','Cancel')]}
},
'set_date': {
'actions': [_auction_move_set],
'result': {'type': 'state', 'state':'end'}
}
}
wiz_auc_lots_auction_move('auction.lots.auction_move')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,103 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import netsvc
import osv
import time
import pooler
invoice_form = '''<?xml version="1.0"?>
<form string="Pay invoice">
<field name="amount"/>
<field name="dest_account_id"/>
<field name="journal_id"/>
<field name="period_id"/>
</form>'''
invoice_fields = {
'amount': {'string': 'Amount paid', 'type':'float', 'required':True},
'dest_account_id': {'string':'Payment to Account', 'type':'many2one', 'required':True, 'relation':'account.account', 'domain':[('type','=','cash')]},
'journal_id': {'string': 'Journal', 'type': 'many2one', 'relation':'account.journal', 'required':True},
'period_id': {'string': 'Period', 'type': 'many2one', 'relation':'account.period', 'required':True},
}
#def pay_n_check(self, cr, uid, data, context):
#
# auction = pool.get('auction.lots').browse(cr,uid,data['id'],context)
# try:
#
# for lot in auction:
#
# if not lot.auction_id :
# raise osv.except_osv("Error","No payment defined for this auction.")
# i=1
# tot= 0
# for payment in auction:
# if not payment.journal_id :
# raise osv.except_osv("Error","No journal defined for the payment line %d" % (i,))
# if not payment.ach_inv_id.amount :
# raise osv.except_osv("Error","No amount defined for the payment line %d." % (i,))
# i+=1
# tot+= payment.ach_inv_id.amount
# if abs(float(tot)) - abs(float(lot.obj_ret)) > 10**-6:
# raise osv.except_osv("Error","The amount paid does not match the total amount")
# else:
# for lot in auction:
# if not lot.journal_id :
# raise osv.except_osv("Error","Please choose a journal for the auction ("+lot.name+").")
# pool.get('auction.lots').create(cr,uid,{
# 'auction_id': lot.auction.id,
# 'journal_id': lot.journal_id,
#
# })
# except osv.except_osv, e:
# raise wizard.except_wizard(e.name, e.name)
# return True
def _pay_and_reconcile(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
lot = pool.get('auction.lots').browse(cr,uid,data['id'],context)
form = data['form']
account_id = form.get('writeoff_acc_id', False)
period_id = form.get('period_id', False)
journal_id = form.get('journal_id', False)
if lot.sel_inv_id:
p=pool.get('account.invoice').pay_and_reconcile(['lot.sel_inv_id.id'], form['amount'], form['dest_account_id'], journal_id, account_id, period_id, journal_id, context)
# lots.sel_inv_id.pay_and_reconcile(cr,uid,data[id], form['amount'], form['dest_account_id'], journal_id, account_id, period_id, journal_id, context)
return {}
class wiz_auc_lots_pay(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':invoice_form, 'fields': invoice_fields, 'state':[ ('pay','Pay'), ('end','Cancel')]}
},
'pay': {
'actions': [_pay_and_reconcile],
'result': {'type': 'state', 'state':'end'}
}}
wiz_auc_lots_pay('auction.pay.sel');
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,150 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import urllib
sms_send_form = '''<?xml version="1.0"?>
<form title="%s">
<separator string="%s" colspan="4"/>
<field name="app_id"/>
<newline/>
<field name="user"/>
<field name="password"/>
<newline/>
<field name="text" colspan="3"/>
</form>''' % ('SMS - Gateway: clickatell', 'Bulk SMS send')
sms_send_fields = {
'app_id': {'string':'API ID', 'type':'char', 'required':True},
'user': {'string':'Login', 'type':'char', 'required':True},
'password': {'string':'Password', 'type':'char', 'required':True},
'text': {'string':'SMS Message', 'type':'text', 'required':True, 'value':'Les lots [lots] vous ont etes adjuges. -- Rops'}
}
##############################################################################
#
# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
# Fabien Pinckaers <fp@tiny.Be>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import wizard
import netsvc
import pooler
sms_send_form = '''<?xml version="1.0"?>
<form string="%s">
<separator string="%s" colspan="4"/>
<field name="app_id"/>
<newline/>
<field name="user"/>
<field name="password"/>
<newline/>
<field name="text" colspan="3"/>
</form>''' % ('SMS - Gateway: clickatell','Bulk SMS send')
sms_send_fields = {
'app_id': {'string':'API ID', 'type':'char', 'required':True},
'user': {'string':'Login', 'type':'char', 'required':True},
'password': {'string':'Password', 'type':'char', 'required':True},
'text': {'string':'SMS Message', 'type':'text', 'required':True}
}
def _sms_send(self, cr, uid, data, context):
service = netsvc.LocalService("object_proxy")
lots = service.execute(cr.dbname,uid, 'auction.lots', 'read', data['ids'], ['obj_num','obj_price','ach_uid'])
res = service.execute(cr.dbname,uid, 'res.partner', 'read', [l['ach_uid'] for l in lots if l['ach_uid']], ['gsm'])
#res = service.execute(cr.dbname, uid, 'res.partner', 'read', data['ids'], ['gsm'])
# service = netsvc.LocalService("object_proxy")
# pool=pooler.get_pool(cr.dbname)
# lots=pool.get('auction.lots').browse(cr,uid,data['id'],context)
# r=lots.ach_uid.id
nbr = 0
for r in res:
to = r['mobile']
if to:
tools.smssend(data['form']['user'], data['form']['password'], data['form']['app_id'], unicode(data['form']['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
if to:
tools.smssend(data['form']['user'], data['form']['password'], data['form']['app_id'], unicode(data['form']['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
#
#def _sms_send(self, uid, datas):
# service = netsvc.LocalService("object_proxy")
# pool=pooler.ger_pool(cr.dbname)
# lots=pool.get('auction.lots').browse(cr,uid,datas['ids'],context)
# #lots = service.execute(uid, 'auction.lots', 'read', datas['ids'], ['obj_num','obj_price','ach_uid'])
# #part = service.execute(uid, 'res.partner', 'read', [l['ach_uid'] for l in lots if l['ach_uid']], ['gsm'])
#
# part =ach_uid.id
# part = map(lambda x: (x.id,x.mobile), part)
# for l in lots:
# part.append(str(l.obj_num)+'-%dEUR' % int(l.obj_price))
#
# for p in part.values():
# to = p.mobile
# if to:
# params = urllib.urlencode({'user': datas['form']['user'], 'password': datas['form']['password'], 'api_id': datas['form']['app_id'], 'text':unicode(datas['form']['text'].replace('[lots]',', '.join(p['lots'])), 'utf-8').encode('latin1'), 'to':to})
# f = urllib.urlopen("http://196.7.150.220/http/sendmsg", params)
# nbr+=1
# return {'sms_sent':nbr}
class lots_sms(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':sms_send_form, 'fields': sms_send_fields, 'state':[('send','Send SMS'), ('end','Cancel')]}
},
'send': {
'actions': [_sms_send],
'result': {'type': 'state', 'state':'end'}
}
}
lots_sms('auction.lots.sms_send');
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,109 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import netsvc
import osv
import time
import pooler
pay_form = '''<?xml version="1.0"?>
<form string="Pay objects">
<field name="amount"/>
<field name="statement_id1" domain="[('state','=','draft')]"/>
<field name="amount2"/>
<field name="statement_id2" domain="[('state','=','draft')]"/>
<field name="amount3"/>
<field name="statement_id3" domain="[('state','=','draft')]"/>
<newline/>
<field name="buyer_id"/>
<field name="total"/>
</form>'''
def _start(self,cr,uid,data,context):
pool = pooler.get_pool(cr.dbname)
rec=pool.get('auction.lots').browse(cr,uid,data['ids'],context)
amount1=0.0
for r in rec:
amount1+=r.buyer_price
buyer= r and r.ach_uid.id or False
if r.is_ok:
raise wizard.except_wizard('Error !', 'Some lots of the selection are already paid.')
return {'amount':amount1, 'total':amount1,'buyer_id':buyer}
pay_fields = {
'amount': {'string': 'Amount paid', 'type':'float'},
'buyer_id': {'string': 'Buyer', 'type': 'many2one', 'relation':'res.partner'},
'statement_id1': {'string':'Statement', 'type':'many2one', 'required':True, 'relation':'account.bank.statement'},
'amount2': {'string': 'Amount paid', 'type':'float'},
'statement_id2': {'string':'Statement', 'type':'many2one', 'relation':'account.bank.statement'},
'amount3': {'string': 'Amount paid', 'type':'float'},
'statement_id3': {'string':'Statement', 'type':'many2one', 'relation':'account.bank.statement'},
'total': {'string': 'Amount to paid', 'type':'float','readonly':True}
}
def _pay_and_reconcile(self, cr, uid, data, context):
if not abs(data['form']['total'] - (data['form']['amount']+data['form']['amount2']+data['form']['amount3']))<0.01:
rest=data['form']['total']-(data['form']['amount']+data['form']['amount2']+data['form']['amount3'])
raise wizard.except_wizard('Payment aborted !', 'You should pay all the total: "%.2f" are missing to accomplish the payment.' %(round(rest,2)))
pool = pooler.get_pool(cr.dbname)
lots = pool.get('auction.lots').browse(cr,uid,data['ids'],context)
ref_bk_s=pooler.get_pool(cr.dbname).get('account.bank.statement.line')
for lot in lots:
if data['form']['buyer_id']:
pool.get('auction.lots').write(cr,uid,[lot.id],{'ach_uid':data['form']['buyer_id']})
if not lot.auction_id:
raise wizard.except_wizard('Error !', 'No auction date for "%s": Please set one.'%(lot.name))
pool.get('auction.lots').write(cr,uid,[lot.id],{'is_ok':True})
for st,stamount in [('statement_id1','amount'),('statement_id2','amount2'),('statement_id3','amount3')]:
if data['form'][st]:
new_id=ref_bk_s.create(cr,uid,{
'name':'Buyer:'+str(lot.ach_login or '')+', auction:'+ lots[0].auction_id.name,
'date': time.strftime('%Y-%m-%d'),
'partner_id':data['form']['buyer_id'] or False,
'type':'customer',
'statement_id':data['form'][st],
'account_id':lot.auction_id.acc_income.id,
'amount':data['form'][stamount]
})
for lot in lots:
pool.get('auction.lots').write(cr,uid,[lot.id],{'statement_id':[(4,new_id)]})
return {}
class wiz_auc_lots_pay(wizard.interface):
states = {
'init': {
'actions': [_start],
'result': {'type': 'form', 'arch':pay_form, 'fields': pay_fields, 'state':[('end','Cancel'),('pay','Pay')]}
},
'pay': {
'actions': [_pay_and_reconcile],
'result': {'type': 'state', 'state':'end'}
}}
wiz_auc_lots_pay('auction.pay.buy')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,79 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import netsvc
import osv
import time
import pooler
pay_form = '''<?xml version="1.0"?>
<form string="Check payment for buyer">
</form>'''
pay_fields = {
}
pay_form1 = '''<?xml version="1.0"?>
<form string="Check payment for seller">
</form>'''
pay_fields1 = {
}
def _payer(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
pool.get('auction.lots').write(cr,uid,data['ids'],{'is_ok':True, 'state':'paid'})
return {}
def _payer_sel(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
pool.get('auction.lots').write(cr,uid,data['ids'],{'paid_vnd':True})
return {}
class wiz_auc_pay(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':pay_form, 'fields': pay_fields, 'state':[('end','Cancel'),('pay','Pay')]}
},
'pay': {
'actions': [_payer],
'result': {'type': 'state', 'state':'end'}
}}
wiz_auc_pay('auction.payer')
class wiz_auc_pay_sel(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':pay_form1, 'fields': pay_fields1, 'state':[('end','Cancel'),('pay2','Pay')]}
},
'pay2': {
'actions': [_payer_sel],
'result': {'type': 'state', 'state':'end'}
}}
wiz_auc_pay_sel('auction.payer.sel')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,92 @@
# Occitan (post 1500) translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-12 14:00+0000\n"
"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-13 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: l10n_chart_uk_minimal
#: model:account.account.type,name:l10n_chart_uk_minimal.account_type_receivable
msgid "Receivable"
msgstr ""
#. module: l10n_chart_uk_minimal
#: model:ir.module.module,description:l10n_chart_uk_minimal.module_meta_information
msgid ""
"This is the base module to manage the accounting chart for United Kingdom in "
"Open ERP."
msgstr ""
#. module: l10n_chart_uk_minimal
#: constraint:account.account.template:0
msgid "Error ! You can not create recursive account templates."
msgstr ""
#. module: l10n_chart_uk_minimal
#: model:account.account.type,name:l10n_chart_uk_minimal.account_type_income
msgid "Income"
msgstr "Produches"
#. module: l10n_chart_uk_minimal
#: model:account.account.type,name:l10n_chart_uk_minimal.account_type_tax
msgid "Tax"
msgstr "Impôts et taxes"
#. module: l10n_chart_uk_minimal
#: model:account.account.type,name:l10n_chart_uk_minimal.account_type_cash
msgid "Cash"
msgstr ""
#. module: l10n_chart_uk_minimal
#: model:ir.actions.todo,note:l10n_chart_uk_minimal.config_call_account_template_uk_minimal
msgid ""
"Generate Chart of Accounts from a Chart Template. You will be asked to pass "
"the name of the company, the chart template to follow, the no. of digits to "
"generate the code for your accounts and Bank account, currency to create "
"Journals. Thus,the pure copy of chart Template is generated.\n"
"\tThis is the same wizard that runs from Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template."
msgstr ""
#. module: l10n_chart_uk_minimal
#: model:account.account.type,name:l10n_chart_uk_minimal.account_type_payable
msgid "Payable"
msgstr ""
#. module: l10n_chart_uk_minimal
#: model:ir.module.module,shortdesc:l10n_chart_uk_minimal.module_meta_information
msgid "United Kingdom - minimal"
msgstr ""
#. module: l10n_chart_uk_minimal
#: model:account.account.type,name:l10n_chart_uk_minimal.account_type_equity
msgid "Equity"
msgstr ""
#. module: l10n_chart_uk_minimal
#: constraint:account.tax.code.template:0
msgid "Error ! You can not create recursive Tax Codes."
msgstr ""
#. module: l10n_chart_uk_minimal
#: model:account.account.type,name:l10n_chart_uk_minimal.account_type_expense
msgid "Expense"
msgstr "Despensas"
#. module: l10n_chart_uk_minimal
#: model:account.account.type,name:l10n_chart_uk_minimal.account_type_view
msgid "View"
msgstr "Afichatge"

1049
addons/l10n_fr/i18n/oc.po Normal file

File diff suppressed because it is too large Load Diff

126
addons/l10n_lu/i18n/oc.po Normal file
View File

@ -0,0 +1,126 @@
# Occitan (post 1500) translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-12 13:54+0000\n"
"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-13 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: l10n_lu
#: wizard_view:l10n_lu.tax.report.wizard,init:0
msgid "VAT Legal Declaration"
msgstr ""
#. module: l10n_lu
#: constraint:account.account.template:0
msgid "Error ! You can not create recursive account templates."
msgstr ""
#. module: l10n_lu
#: wizard_button:l10n_lu.tax.report.wizard,init,pdf:0
msgid "Print Taxes Statement"
msgstr ""
#. module: l10n_lu
#: wizard_field:l10n_lu.tax.report.wizard,init,tax_code_id:0
msgid "Company"
msgstr "Entrepresa"
#. module: l10n_lu
#: model:account.account.type,name:l10n_lu.account_type_income
msgid "Income"
msgstr "Produches"
#. module: l10n_lu
#: model:account.account.type,name:l10n_lu.account_type_cash_moves
msgid "Cash"
msgstr ""
#. module: l10n_lu
#: model:ir.actions.todo,note:l10n_lu.config_call_account_template
msgid ""
"Generate Chart of Accounts from a Chart Template. You will be asked to "
"select the company, the chart template, the no. of digits to generate the "
"code for your accounts and Bank account, currency to create Journals. "
"Thus,the pure copy of chart Template is generated.\n"
"This is the same wizard that runs from Financial "
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template."
msgstr ""
#. module: l10n_lu
#: model:ir.actions.report.xml,name:l10n_lu.legal_vat
msgid "Luxembourg VAT Declaration"
msgstr ""
#. module: l10n_lu
#: model:account.account.type,name:l10n_lu.account_type_liability
msgid "Liability"
msgstr ""
#. module: l10n_lu
#: model:ir.ui.menu,name:l10n_lu.legal_lu
msgid "Luxembourg"
msgstr "Luxemborg"
#. module: l10n_lu
#: model:ir.actions.wizard,name:l10n_lu.wizard_print_vat
#: model:ir.ui.menu,name:l10n_lu.legal_lu_vat
msgid "VAT Declaration"
msgstr ""
#. module: l10n_lu
#: wizard_field:l10n_lu.tax.report.wizard,init,period_id:0
msgid "Period"
msgstr ""
#. module: l10n_lu
#: model:account.account.type,name:l10n_lu.account_type_asset
msgid "Asset"
msgstr ""
#. module: l10n_lu
#: model:account.account.type,name:l10n_lu.account_type_cash_equity
msgid "Equity"
msgstr ""
#. module: l10n_lu
#: wizard_button:l10n_lu.tax.report.wizard,init,end:0
msgid "Cancel"
msgstr "Anullar"
#. module: l10n_lu
#: constraint:account.tax.code.template:0
msgid "Error ! You can not create recursive Tax Codes."
msgstr ""
#. module: l10n_lu
#: model:ir.module.module,shortdesc:l10n_lu.module_meta_information
msgid "Luxembourg - Plan Comptable Minimum Normalise"
msgstr ""
#. module: l10n_lu
#: model:account.account.type,name:l10n_lu.account_type_expense
msgid "Expense"
msgstr ""
#. module: l10n_lu
#: model:account.account.type,name:l10n_lu.account_type_creances
msgid "Créances"
msgstr ""
#. module: l10n_lu
#: model:account.account.type,name:l10n_lu.account_type_root
msgid "View"
msgstr "Afichatge"

View File

@ -71,9 +71,14 @@ class make_procurement(osv.osv_memory):
"""
user = self.pool.get('res.users').browse(cr, uid, uid, context).login
wh_obj = self.pool.get('stock.warehouse')
procurement_obj = self.pool.get('mrp.procurement')
wf_service = netsvc.LocalService("workflow")
data_obj = self.pool.get('ir.model.data')
for proc in self.browse(cr, uid, ids):
wh = self.pool.get('stock.warehouse').browse(cr, uid, proc.warehouse_id.id, context)
procure_id = self.pool.get('mrp.procurement').create(cr, uid, {
wh = wh_obj.browse(cr, uid, proc.warehouse_id.id, context)
procure_id = procurement_obj.create(cr, uid, {
'name':'INT: '+str(user),
'date_planned': proc.date_planned,
'product_id': proc.product_id.id,
@ -82,12 +87,13 @@ class make_procurement(osv.osv_memory):
'location_id': wh.lot_stock_id.id,
'procure_method':'make_to_order',
})
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'mrp.procurement', procure_id, 'button_confirm', cr)
data_obj = self.pool.get('ir.model.data')
id2 = data_obj._get_id(cr, uid, 'mrp', 'mrp_procurement_tree_view')
id3 = data_obj._get_id(cr, uid, 'mrp', 'mrp_procurement_form_view')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:

View File

@ -34,6 +34,16 @@ class mrp_product_produce(osv.osv_memory):
}
def _get_product_qty(self, cr, uid, context):
"""
@summary: to obtain product quantity
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param context: A standard dictionary
@return: quantity
"""
prod = self.pool.get('mrp.production').browse(cr, uid,
context['active_id'], context=context)
done = 0.0
@ -47,6 +57,17 @@ class mrp_product_produce(osv.osv_memory):
}
def do_produce(self, cr, uid, ids, context={}):
"""
@summary: to check the product type
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param ids: the ID or list of IDs if we want more than one
@param context: A standard dictionary
@return:
"""
prod_obj = self.pool.get('mrp.production')
move_ids = context['active_ids']
for data in self.read(cr, uid, ids):

View File

@ -0,0 +1,89 @@
# Occitan (post 1500) translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-12 13:51+0000\n"
"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-13 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp_subproduct
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: mrp_subproduct
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: mrp_subproduct
#: view:mrp.bom:0
msgid "sub products"
msgstr ""
#. module: mrp_subproduct
#: field:mrp.subproduct,product_id:0
msgid "Product"
msgstr "Produch"
#. module: mrp_subproduct
#: model:ir.model,name:mrp_subproduct.model_mrp_subproduct
msgid "Mrp Sub Product"
msgstr "Components per MRP"
#. module: mrp_subproduct
#: field:mrp.subproduct,subproduct_type:0
msgid "Quantity Type"
msgstr ""
#. module: mrp_subproduct
#: field:mrp.subproduct,product_qty:0
msgid "Product Qty"
msgstr ""
#. module: mrp_subproduct
#: field:mrp.subproduct,product_uom:0
msgid "Product UOM"
msgstr ""
#. module: mrp_subproduct
#: field:mrp.subproduct,bom_id:0
msgid "BoM"
msgstr "Nomenclatura"
#. module: mrp_subproduct
#: view:mrp.bom:0
msgid "Sub Products"
msgstr ""
#. module: mrp_subproduct
#: selection:mrp.subproduct,subproduct_type:0
msgid "Variable"
msgstr "Variabla"
#. module: mrp_subproduct
#: field:mrp.bom,sub_products:0
msgid "sub_products"
msgstr ""
#. module: mrp_subproduct
#: selection:mrp.subproduct,subproduct_type:0
msgid "Fixed"
msgstr ""
#. module: mrp_subproduct
#: model:ir.module.module,shortdesc:mrp_subproduct.module_meta_information
msgid "MRP Sub Product"
msgstr ""

View File

@ -0,0 +1,192 @@
# Occitan (post 1500) translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-08 11:46+0000\n"
"PO-Revision-Date: 2010-03-12 13:42+0000\n"
"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-13 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
#: help:multi_company.default,object_id:0
msgid "Object affect by this rules"
msgstr ""
#. module: multi_company
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: multi_company
#: constraint:product.template:0
msgid ""
"Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
#. module: multi_company
#: constraint:res.partner:0
msgid "The VAT doesn't seem to be correct."
msgstr ""
#. module: multi_company
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: multi_company
#: model:res.company,overdue_msg:multi_company.res_company_odoo
#: model:res.company,overdue_msg:multi_company.res_company_oerp_be
#: model:res.company,overdue_msg:multi_company.res_company_oerp_editor
#: model:res.company,overdue_msg:multi_company.res_company_oerp_in
#: model:res.company,overdue_msg:multi_company.res_company_oerp_us
msgid ""
"Would your payment have been carried out after this mail was sent, please "
"consider the present one as void. Do not hesitate to contact our accounting "
"department"
msgstr ""
#. module: multi_company
#: field:multi_company.default,company_dest_id:0
msgid "Default Company"
msgstr ""
#. module: multi_company
#: field:multi_company.default,object_id:0
msgid "Object"
msgstr "Objècte"
#. module: multi_company
#: model:ir.module.module,shortdesc:multi_company.module_meta_information
#: view:multi_company.default:0
msgid "Multi Company"
msgstr "Multisocietat"
#. module: multi_company
#: model:ir.module.module,description:multi_company.module_meta_information
msgid ""
"This module add the possibility to easily manage \n"
" the default value for each object\n"
" "
msgstr ""
#. module: multi_company
#: field:multi_company.default,company_id:0
msgid "Main Company"
msgstr ""
#. module: multi_company
#: view:multi_company.default:0
msgid "Condition"
msgstr "Condicion"
#. module: multi_company
#: help:multi_company.default,company_dest_id:0
msgid "Company to store the current record"
msgstr ""
#. module: multi_company
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "XML invalid per l'arquitectura de la vista"
#. module: multi_company
#: field:multi_company.default,name:0
msgid "Name"
msgstr "Nom"
#. module: multi_company
#: constraint:product.template:0
msgid "Error: UOS must be in a different category than the UOM"
msgstr ""
#. module: multi_company
#: model:product.category,name:multi_company.Odoo1
msgid "Odoo Offers"
msgstr ""
#. module: multi_company
#: constraint:res.company:0
msgid "Error! You can not create recursive companies."
msgstr ""
#. module: multi_company
#: help:multi_company.default,name:0
msgid "Name it to easily find a record"
msgstr ""
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_custom_multicompany
msgid "Multi company"
msgstr "Multisocietat"
#. module: multi_company
#: model:ir.model,name:multi_company.model_multi_company_default
msgid "multi_company.default"
msgstr "multi_company.default"
#. module: multi_company
#: help:multi_company.default,company_id:0
msgid "Company where the user is connected"
msgstr ""
#. module: multi_company
#: model:ir.actions.act_window,name:multi_company.action_inventory_form
msgid "Default Company per Object"
msgstr ""
#. module: multi_company
#: field:multi_company.default,expression:0
msgid "Expression"
msgstr "Expression"
#. module: multi_company
#: model:product.template,name:multi_company.product_product_odoo1_product_template
msgid "Odoo Offer"
msgstr ""
#. module: multi_company
#: field:multi_company.default,sequence:0
msgid "Sequence"
msgstr "Sequéncia"
#. module: multi_company
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
msgstr ""
#. module: multi_company
#: constraint:product.product:0
msgid "Error: Invalid ean code"
msgstr ""
#. module: multi_company
#: help:multi_company.default,expression:0
msgid "Expression, must be True to match"
msgstr ""
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_action_inventory_form
msgid "Default company per Object"
msgstr ""
#. module: multi_company
#: code:addons/multi_company/multi_company.py:0
#, python-format
msgid " (copy)"
msgstr " (còpia)"
#. module: multi_company
#: view:multi_company.default:0
msgid "Matching"
msgstr "Correspondéncia"

View File

@ -0,0 +1,31 @@
# Occitan (post 1500) translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
"PO-Revision-Date: 2010-03-12 13:38+0000\n"
"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-13 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: olap_crm
#: model:ir.module.module,description:olap_crm.module_meta_information
msgid ""
"\n"
" Sale module will load the data in olap tables\n"
" "
msgstr ""
#. module: olap_crm
#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
msgid "olap_crm"
msgstr "olap_crm"

View File

@ -0,0 +1,56 @@
# Occitan (post 1500) translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-26 05:29+0000\n"
"PO-Revision-Date: 2010-03-12 13:38+0000\n"
"Last-Translator: Cédric VALMARY <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-03-13 04:51+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: olap_extract
#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
msgid "olap_extract"
msgstr ""
#. module: olap_extract
#: wizard_button:olap.extract.schema,init,ok:0
msgid "OK"
msgstr "D'acòrdi"
#. module: olap_extract
#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
msgid "Olap Extract"
msgstr ""
#. module: olap_extract
#: model:ir.module.module,description:olap_extract.module_meta_information
msgid ""
"\n"
" Extracts the schema structure.\n"
" "
msgstr ""
#. module: olap_extract
#: wizard_field:olap.extract.schema,init,module_name:0
msgid "Module Name"
msgstr ""
#. module: olap_extract
#: wizard_button:olap.extract.schema,init,end:0
msgid "Cancel"
msgstr "Anullar"
#. module: olap_extract
#: wizard_view:olap.extract.schema,init:0
msgid "New Module Name"
msgstr ""

View File

@ -43,7 +43,7 @@ class sale_order_line_make_invoice(osv.osv_memory):
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param ids: the ID or list of IDs if we want more than one
@param ids: the ID or list of IDs
@param context: A standard dictionary
@return: A dictionary which of fields with values.