[MERGE] Merged trunk.

bzr revid: jra@tinyerp.com-20121102112902-lxog1903hwrsibw5
This commit is contained in:
Jiten (OpenERP)
2012-11-02 16:59:02 +05:30
126 changed files with 810 additions and 51257 deletions
+11 -11
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-06-20 16:03+0000\n"
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
"PO-Revision-Date: 2012-11-01 18:30+0000\n"
"Last-Translator: Dusan Laznik <laznik@mentis.si>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:04+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
#: view:account.invoice.report:0
@@ -1587,7 +1587,7 @@ msgstr "Neobdavčeno"
#. module: account
#: view:account.partner.reconcile.process:0
msgid "Go to Next Partner"
msgstr ""
msgstr "Naslednji parner"
#. module: account
#: view:account.bank.statement:0
@@ -3150,7 +3150,7 @@ msgstr "Predloge kontnih načrtov"
#. module: account
#: model:ir.actions.act_window,name:account.action_wizard_multi_chart
msgid "Set Your Accounting Options"
msgstr ""
msgstr "Nastavitve"
#. module: account
#: view:report.account.sales:0
@@ -4358,7 +4358,7 @@ msgstr "res_config_contents"
#. module: account
#: view:account.unreconcile:0
msgid "Unreconciliate Transactions"
msgstr ""
msgstr "Neusklajene postavke"
#. module: account
#: help:account.chart.template,visible:0
@@ -4558,7 +4558,7 @@ msgstr "Datum dogodka"
#. module: account
#: view:account.unreconcile.reconcile:0
msgid "Unreconciliation Transactions"
msgstr ""
msgstr "Naknadno odprte postavke"
#. module: account
#: field:account.tax,ref_tax_code_id:0
@@ -6046,7 +6046,7 @@ msgstr "Davek(%)"
#. module: account
#: view:account.addtmpl.wizard:0
msgid "Create an Account Based on this Template"
msgstr ""
msgstr "Ustvarite konto na osnovi te predloge"
#. module: account
#: view:account.account.type:0
@@ -8827,7 +8827,7 @@ msgstr "Prodaja po vrstah"
#. module: account
#: view:account.analytic.cost.ledger.journal.report:0
msgid "Cost Ledger for Period"
msgstr ""
msgstr "Stroški za obdobje"
#. module: account
#: help:account.tax,child_depend:0
@@ -10307,7 +10307,7 @@ msgstr "Urejanje vrst dnevnikov."
#. module: account
#: view:account.payment.term:0
msgid "Description on Invoices"
msgstr ""
msgstr "Opis na računih"
#. module: account
#: model:ir.model,name:account.model_account_analytic_chart
+3 -3
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-10-30 16:03+0000\n"
"PO-Revision-Date: 2012-11-01 08:44+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-31 04:40+0000\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: account
@@ -9642,7 +9642,7 @@ msgstr "本报表让您打印或产生一个由所有账簿生成的总账"
#: selection:account.account.template,type:0
#: selection:account.entries.report,type:0
msgid "Regular"
msgstr "定期"
msgstr "常规科目"
#. module: account
#: view:account.account:0
+2 -2
View File
@@ -144,8 +144,8 @@
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
<label for="unit_amount"/>
<div>
<field name="unit_amount" class="oe_inline"/>
<field name="product_uom_id" class="oe_inline"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
</div>
</group>
<group string="General Accounting">
@@ -42,7 +42,7 @@
<field name="arch" type="xml">
<graph string="Invoices Analysis" type="bar">
<field name="product_id"/>
<field name="user_currency_price_total"/>
<field name="price_total"/>
</graph>
</field>
</record>
+1 -1
View File
@@ -268,7 +268,7 @@
<field name="target">inline</field>
</record>
<menuitem id="menu_account_config" name="Accounting" parent="base.menu_config"
<menuitem id="menu_account_config" name="Invoicing" parent="base.menu_config"
sequence="14" action="action_account_config"/>
</data>
@@ -5,6 +5,7 @@
<!-- Top menu item -->
<menuitem name="Accounting"
id="account.menu_finance"/>
<menuitem id="account.menu_account_config" name="Accounting" parent="base.menu_config"/>
</data>
@@ -10,6 +10,12 @@
<field name="domain">[('invoice_id','=',False)]</field>
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
<field name="help" type="html">
<p>
You will find here timesheets and purchases you did for contracts that can be reinvoiced to the customer.
If you want to record new jobs to invoice, you should use the timesheet menu instead.
</p>
</field>
</record>
<menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="base.menu_invoiced" sequence="5"/>
@@ -38,7 +38,7 @@ Allows to automatically select analytic accounts based on criterions:
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'images': ['images/analytic_defaults.jpeg'],
'depends': ['sale'],
'depends': ['sale_stock'],
'data': [
'security/ir.model.access.csv',
'security/account_analytic_default_security.xml',
@@ -105,7 +105,7 @@ account_bank_statement_line_global()
class account_bank_statement_line(osv.osv):
_inherit = 'account.bank.statement.line'
_columns = {
'val_date': fields.date('Valuta Date', states={'confirm': [('readonly', True)]}),
'val_date': fields.date('Value Date', states={'confirm': [('readonly', True)]}),
'globalisation_id': fields.many2one('account.bank.statement.line.global', 'Globalisation ID',
states={'confirm': [('readonly', True)]},
help="Code to identify transactions belonging to the same globalisation level within a batch payment"),
@@ -56,9 +56,6 @@
<field name="globalisation_id"/>
<field name="state" invisible="1"/>
</xpath>
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='date']" position="replace">
<field name="date" string="'Entry Date'" attrs="{'readonly':[('state','=','draft')]}" />
</xpath>
</data>
</field>
</record>
@@ -151,7 +148,7 @@
<field name="name">Bank Statement Lines</field>
<field name="res_model">account.bank.statement.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph,form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'block_statement_line_delete' : 1}</field>
<field name="search_view_id" ref="view_bank_statement_line_filter"/>
<field name="view_id" ref="view_bank_statement_line_list"/>
@@ -290,7 +290,7 @@
<field name="arch" type="xml">
<notebook position="inside">
<page string="Budget Lines" groups="account.group_account_user">
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree,graph">
<field name="crossovered_budget_line" widget="one2many_list" colspan="4" nolabel="1" mode="tree">
<tree string="Budget Lines" editable="top">
<field name="crossovered_budget_id"/>
<field name="general_budget_id"/>
@@ -310,11 +310,6 @@
<field name="paid_date"/>
<field name="planned_amount"/>
</form>
<graph type="bar" string="Lines">
<field name="general_budget_id" />
<field name="planned_amount" operator="+"/>
<field group="True" name="analytic_account_id"/>
</graph>
</field>
</page>
</notebook>
@@ -290,7 +290,7 @@
<group>
<group>
<field name="state" invisible="1"/>
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'search_default_supplier': 1}"/>
<field name="currency_id" invisible="1"/>
<field name="amount" class="oe_inline"
string="Paid Amount"
+1 -1
View File
@@ -180,7 +180,7 @@ class account_analytic_account(osv.osv):
'partner_id': fields.many2one('res.partner', 'Customer'),
'user_id': fields.many2one('res.users', 'Project Manager'),
'manager_id': fields.many2one('res.users', 'Account Manager'),
'date_start': fields.date('Date Start'),
'date_start': fields.date('Start Date'),
'date': fields.date('Date End', select=True),
'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts.
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','To Renew'),('close','Closed')], 'Status', required=True,),
+4 -3
View File
@@ -336,7 +336,7 @@ class calendar_attendee(osv.osv):
('non-participant', 'For information Purpose')], 'Role', \
help='Participation role for the calendar user'),
'state': fields.selection([('needs-action', 'Needs Action'),
('tentative', 'Tentative'),
('tentative', 'Uncertain'),
('declined', 'Declined'),
('accepted', 'Accepted'),
('delegated', 'Delegated')], 'Status', readonly=True, \
@@ -559,7 +559,8 @@ property or property parameter."),
for vals in self.browse(cr, uid, ids, context=context):
if vals.ref and vals.ref.user_id:
mod_obj = self.pool.get(vals.ref._name)
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id}
res=mod_obj.read(cr,uid,[vals.ref.id],['duration','class'],context)
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id,'duration':res[0]['duration'],'class':res[0]['class']}
mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
@@ -1012,7 +1013,7 @@ class calendar_event(osv.osv):
'Show Time as', states={'done': [('readonly', True)]}),
'base_calendar_url': fields.char('Caldav URL', size=264),
'state': fields.selection([
('tentative', 'Tentative'),
('tentative', 'Uncertain'),
('cancelled', 'Cancelled'),
('confirmed', 'Confirmed'),
], 'Status', readonly=True),
+3 -2
View File
@@ -89,7 +89,8 @@
<page string="Meeting Details">
<group>
<group>
<field name="date" string="Starting at"/>
<field name="date" string="Starting at"
on_change="onchange_dates(date, duration, False, allday)"/>
<label for="duration"/>
<div>
<field name="duration" widget="float_time"
@@ -100,7 +101,7 @@
<label for="allday" string="All Day?"/>)
</div>
<field name="date_deadline" groups="base.group_no_one"
attrs="{'invisible': [('allday','=',True)]}"
attrs="{'invisible': ['|', ('allday','=',True), ('duration','&lt;', 24)]}"
on_change="onchange_dates(date,False,date_deadline)"/>
</group>
<group>
+1 -1
View File
@@ -1146,7 +1146,7 @@ msgstr ""
#: selection:calendar.attendee,state:0
#: selection:calendar.event,state:0
#: selection:calendar.todo,state:0
msgid "Tentative"
msgid "Uncertain"
msgstr ""
#. module: base_calendar
+1 -1
View File
@@ -26,7 +26,7 @@ Re-implement openerp's file import system:
'author': 'OpenERP SA',
'depends': ['base'],
'installable': True,
'auto_install': True,
'auto_install': False,
'css': [
'static/lib/select2/select2.css',
'static/src/css/import.css',
+11 -3
View File
@@ -316,9 +316,17 @@ class ir_import(orm.TransientModel):
}]
_logger.info('importing %d rows...', len(data))
import_result = self.pool[record.res_model].load(
cr, uid, import_fields, data, context=context)
_logger.info('done')
try:
import_result = self.pool[record.res_model].load(
cr, uid, import_fields, data, context=context)
_logger.info('done')
except Exception, e:
_logger.info(e)
return [{
'type': 'error',
'message': unicode('No data have been imported.'),
'record': False,
}]
# If transaction aborted, RELEASE SAVEPOINT is going to raise
# an InternalError (ROLLBACK should work, maybe). Ignore that.
@@ -0,0 +1,6 @@
External ID,Name,Parent Category/External ID
a1,Expenses,product.product_category_all
a2,Other Products,product.product_category_all
a3,Sellable Products,product.product_category_all
a4,Tables,a1
a5,Seating furniture,a2
1 External ID Name Parent Category/External ID
2 a1 Expenses product.product_category_all
3 a2 Other Products product.product_category_all
4 a3 Sellable Products product.product_category_all
5 a4 Tables a1
6 a5 Seating furniture a2
@@ -0,0 +1,6 @@
External ID,Name,Internal Reference,Category/External ID,Can be Expensed,Can be Purchased,Can be Sold,Sale Price,Cost,Supply Method,Product Type,Procurement Method
a6,Aluminum Stool,ALS,a5,False,True,True,49.00,25.00,Buy,Stockable Product,Make to Stock
a7,Chair,CHR,a5,False,True,True,89.00,40.00,Buy,Stockable Product,Make to Stock
a8,Table,TBL,a4,False,True,True,169.00,100.00,Buy,Stockable Product,Make to Stock
a9,Software Book Tutorial,SBT,a2,False,True,False,19.00,8.00,Buy,Consumable,Make to Stock
a10,Fuel,FL,a1,True,False,False,0.30,0.25,Buy,Service,Make to Stock
1 External ID Name Internal Reference Category/External ID Can be Expensed Can be Purchased Can be Sold Sale Price Cost Supply Method Product Type Procurement Method
2 a6 Aluminum Stool ALS a5 False True True 49.00 25.00 Buy Stockable Product Make to Stock
3 a7 Chair CHR a5 False True True 89.00 40.00 Buy Stockable Product Make to Stock
4 a8 Table TBL a4 False True True 169.00 100.00 Buy Stockable Product Make to Stock
5 a9 Software Book Tutorial SBT a2 False True False 19.00 8.00 Buy Consumable Make to Stock
6 a10 Fuel FL a1 True False False 0.30 0.25 Buy Service Make to Stock
@@ -0,0 +1,6 @@
Name,Internal Reference,Can be Expensed,Can be Purchased,Can be Sold,Sale Price,Cost,Supply Method,Product Type,Procurement Method
Aluminum Stool,ALS,False,True,True,49.00,25.00,Buy,Stockable Product,Make to Stock
Chair,CHR,False,True,True,89.00,40.00,Buy,Stockable Product,Make to Stock
Table,TBL,False,True,True,169.00,100.00,Buy,Stockable Product,Make to Stock
Software Book Tutorial,SBT,False,True,False,19.00,8.00,Buy,Consumable,Make to Stock
Fuel,FL,True,False,False,0.30,0.25,Buy,Service,Make to Stock
1 Name Internal Reference Can be Expensed Can be Purchased Can be Sold Sale Price Cost Supply Method Product Type Procurement Method
2 Aluminum Stool ALS False True True 49.00 25.00 Buy Stockable Product Make to Stock
3 Chair CHR False True True 89.00 40.00 Buy Stockable Product Make to Stock
4 Table TBL False True True 169.00 100.00 Buy Stockable Product Make to Stock
5 Software Book Tutorial SBT False True False 19.00 8.00 Buy Consumable Make to Stock
6 Fuel FL True False False 0.30 0.25 Buy Service Make to Stock
@@ -0,0 +1,155 @@
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: companies; Type: TABLE; Schema: public; Owner: fp; Tablespace:
--
CREATE TABLE companies (
id integer NOT NULL,
company_name character varying
);
ALTER TABLE public.companies OWNER TO fp;
--
-- Name: companies_id_seq; Type: SEQUENCE; Schema: public; Owner: fp
--
CREATE SEQUENCE companies_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public.companies_id_seq OWNER TO fp;
--
-- Name: companies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: fp
--
ALTER SEQUENCE companies_id_seq OWNED BY companies.id;
--
-- Name: companies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: fp
--
SELECT pg_catalog.setval('companies_id_seq', 3, true);
--
-- Name: persons; Type: TABLE; Schema: public; Owner: fp; Tablespace:
--
CREATE TABLE persons (
id integer NOT NULL,
company_id integer,
person_name character varying
);
ALTER TABLE public.persons OWNER TO fp;
--
-- Name: persons_id_seq; Type: SEQUENCE; Schema: public; Owner: fp
--
CREATE SEQUENCE persons_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
ALTER TABLE public.persons_id_seq OWNER TO fp;
--
-- Name: persons_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: fp
--
ALTER SEQUENCE persons_id_seq OWNED BY persons.id;
--
-- Name: persons_id_seq; Type: SEQUENCE SET; Schema: public; Owner: fp
--
SELECT pg_catalog.setval('persons_id_seq', 4, true);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: fp
--
ALTER TABLE ONLY companies ALTER COLUMN id SET DEFAULT nextval('companies_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: fp
--
ALTER TABLE ONLY persons ALTER COLUMN id SET DEFAULT nextval('persons_id_seq'::regclass);
--
-- Data for Name: companies; Type: TABLE DATA; Schema: public; Owner: fp
--
COPY companies (id, company_name) FROM stdin;
1 Bigees
2 Organi
3 Boum
\.
--
-- Data for Name: persons; Type: TABLE DATA; Schema: public; Owner: fp
--
COPY persons (id, company_id, person_name) FROM stdin;
1 1 Fabien
2 1 Laurence
3 2 Eric
4 3 Ramsy
\.
--
-- Name: companies_pkey; Type: CONSTRAINT; Schema: public; Owner: fp; Tablespace:
--
ALTER TABLE ONLY companies
ADD CONSTRAINT companies_pkey PRIMARY KEY (id);
--
-- Name: persons_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: fp
--
ALTER TABLE ONLY persons
ADD CONSTRAINT persons_company_id_fkey FOREIGN KEY (company_id) REFERENCES companies(id);
--
-- PostgreSQL database dump complete
--
@@ -0,0 +1,6 @@
Name,Reference,Tags,Customer,Street,City,Country
Credit & Leasing,3,Services,True,Central Avenue 814,Johannesburg,South Africa
Services & Finance,5,"Consultancy Services,IT Services",True,Grove Road 5,London,United Kingdom
Hydra Supplies,6,"Manufacturer,Retailer",True,Palm Street 9,Los Angeles,United States
Bolts & Screws,8,"Wholesaler,Components Buyer",True,Rua Américo 1000,Campinas,Brazil
National Parts & Supplies,18,"Manufacturer,Wholesaler",True,Guangdong Way 20,Shenzen,China
1 Name Reference Tags Customer Street City Country
2 Credit & Leasing 3 Services True Central Avenue 814 Johannesburg South Africa
3 Services & Finance 5 Consultancy Services,IT Services True Grove Road 5 London United Kingdom
4 Hydra Supplies 6 Manufacturer,Retailer True Palm Street 9 Los Angeles United States
5 Bolts & Screws 8 Wholesaler,Components Buyer True Rua Américo 1000 Campinas Brazil
6 National Parts & Supplies 18 Manufacturer,Wholesaler True Guangdong Way 20 Shenzen China
@@ -0,0 +1,10 @@
Order Date,Order Reference,Supplier,Destination,Pricelist,Order Lines / Product,Order Lines / Quantity
2012-12-15,PO00008,ASUSTeK,Stock,Default Purchase Pricelist,ADPT,20
,,,,,CARD,30
,,,,,C-Case,40
2012-12-15,PO00009,Axelor,Stock,Default Purchase Pricelist,CD,5
,,,,,CPUa8,15
2012-12-15,PO000010,China Export,Stock,Default Purchase Pricelist,HDD SH-1,10
,,,,,HDD SH-2,20
,,,,,LAP-CUS,35
,,,,,LAP-E5,40
1 Order Date Order Reference Supplier Destination Pricelist Order Lines / Product Order Lines / Quantity
2 2012-12-15 PO00008 ASUSTeK Stock Default Purchase Pricelist ADPT 20
3 CARD 30
4 C-Case 40
5 2012-12-15 PO00009 Axelor Stock Default Purchase Pricelist CD 5
6 CPUa8 15
7 2012-12-15 PO000010 China Export Stock Default Purchase Pricelist HDD SH-1 10
8 HDD SH-2 20
9 LAP-CUS 35
10 LAP-E5 40
@@ -0,0 +1,8 @@
Name,Address type,Street,City,Country,Tags,Supplier,Customer,Is a company,Companies that refers to partner / Parent company
Wood y Wood Pecker,,"Snow Street, 25",Kainuu,Finland,Supplier,1,0,1,
Roger Pecker,Default,"Snow Street, 27",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Sharon Pecker,Delivery,"Snow Street, 28",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Thomas Pecker,Contact,"Snow Street, 27",Kainuu,Finland,Supplier,1,0,0,Wood y Wood Pecker
Vicking Direct,,"Atonium Street, 45a",Brussels,Belgium,Supplier,1,0,1,
Yvan Holiday,Invoice,"Atonium Street, 45b",Brussels,Belgium,Supplier,1,0,0,Vicking Direct
Jack Unsworth,Contact,"Atonium Street, 45a",Brussels,Belgium,Supplier,1,0,0,Vicking Direct
1 Name Address type Street City Country Tags Supplier Customer Is a company Companies that refers to partner / Parent company
2 Wood y Wood Pecker Snow Street, 25 Kainuu Finland Supplier 1 0 1
3 Roger Pecker Default Snow Street, 27 Kainuu Finland Supplier 1 0 0 Wood y Wood Pecker
4 Sharon Pecker Delivery Snow Street, 28 Kainuu Finland Supplier 1 0 0 Wood y Wood Pecker
5 Thomas Pecker Contact Snow Street, 27 Kainuu Finland Supplier 1 0 0 Wood y Wood Pecker
6 Vicking Direct Atonium Street, 45a Brussels Belgium Supplier 1 0 1
7 Yvan Holiday Invoice Atonium Street, 45b Brussels Belgium Supplier 1 0 0 Vicking Direct
8 Jack Unsworth Contact Atonium Street, 45a Brussels Belgium Supplier 1 0 0 Vicking Direct
@@ -0,0 +1,6 @@
"Order Reference","Supplier","Destination","Pricelist","Order Lines / Product","Order Lines / Quantity"
"PO000020","ASUSTeK","Stock","Default Purchase Pricelist","ADPT",20
,,,,"CARD",30
,,,,"C-Case",40
"PO000021","Axelor","Stock","Default Purchase Pricelist","CD",5
,,,,"CPUa8",15
1 Order Reference Supplier Destination Pricelist Order Lines / Product Order Lines / Quantity
2 PO000020 ASUSTeK Stock Default Purchase Pricelist ADPT 20
3 CARD 30
4 C-Case 40
5 PO000021 Axelor Stock Default Purchase Pricelist CD 5
6 CPUa8 15
+9 -5
View File
@@ -1,14 +1,17 @@
.oe_import{
display: inline-block;
width: 600px;
padding: 16px;
}
.oe_import > p {
margin-left: 8px;
margin-right: 8px;
text-align: justify
}
.oe_import h2 {
margin-top: 0;
margin-bottom: 5px;
}
.oe_padding {
padding: 13px;
}
/* ----------- IMPORT BOX ----------- */
.oe_import .oe_import_box{
@@ -17,6 +20,7 @@
background: #F0EEEE;
border-radius: 3px;
border: solid 1px #dddddd;
width: 600px;
}
.oe_import .oe_import_toggle{
margin-top: 8px;
+272 -16
View File
@@ -2,20 +2,25 @@
<t t-name="ImportView">
<t t-set="_id" t-value="_.uniqueId('export')"/>
<form action="" method="post" enctype="multipart/form-data" class="oe_import">
<header>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_validate oe_highlight"
>Validate</button>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_import"
>Import</button>
<span class="oe_fade">or</span>
<a class="oe_import_cancel" href="#">Cancel</a>
</header>
<input type="hidden" name="session_id"
t-att-value="widget.session.session_id"/>
<input type="hidden" name="import_id"/>
<h2>Upload your file</h2>
<div class="oe_view_manager oe_view_manager_current">
<div class="oe_view_manager_header oe_padding">
<h2>
Import a CSV File
</h2>
<input type="hidden" name="session_id"
t-att-value="widget.session.session_id"/>
<input type="hidden" name="import_id"/>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_validate oe_highlight"
>Validate</button>
<button type="button" disabled="disabled"
class="oe_button oe_import_button oe_import_import"
>Import</button>
<span class="oe_fade">or</span>
<a class="oe_import_cancel" href="#">Cancel</a>
</div>
</div>
<p>Select the <a
href="http://en.wikipedia.org/wiki/Comma-separated_values"
class="oe_import_csv" target="_blank">.CSV</a>
@@ -25,7 +30,7 @@
<label t-attf-for="file_#{_id}" autofocus="autofocus">CSV File:</label>
<input type="file" id-attf-id="file_#{_id}"
name="file" class="oe_import_file"/>
<button type="button" class="oe_import_file_reload">
<button type="button" class="oe_import_file_reload" title="Reload data to check changes.">
<img src="/web/static/src/img/icons/gtk-refresh.png"/>
</button>
<div class="oe_import_with_file">
@@ -44,7 +49,7 @@
</div>
</div>
<div class="oe_import_with_file">
<div class="oe_import_with_file oe_padding">
<h2>Map your data to OpenERP</h2>
<input type="checkbox" class="oe_import_has_header"
id="oe_import_has_header" checked="checked"/>
@@ -59,6 +64,7 @@
<table class="oe_import_grid" />
<h2>Frequently Asked Questions</h2>
<dl>
<dt><a href="#" class="oe_import_toggle">
Need to import data from an other application?</a></dt>
@@ -78,9 +84,259 @@
whenever possible</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What can I do when the Import preview table isn't
displayed correctly?</a></dt>
<dd>
<p>By default the Import preview is set on commas as
field separators and quotation marks as text
delimiters. If your csv file does not have these
settings, you can modify the File Format Options
(displayed under the Browse CSV file bar after you
select your file).</p> <p>Note that if your CSV file
has a tabulation as separator, OpenERP will not
detect the separations. You will need to change the
file format options in your spreadsheet application.
See the following question.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How can I change the CSV file format options when
saving in my spreadsheet application?</a></dt>
<dd>
<p>If you edit and save CSV files in speadsheet
applications, your computer's regional settings will
be applied for the separator and delimiter.
We suggest you use OpenOffice or LibreOffice Calc
as they will allow you to modify all three options
(in 'Save As' dialog box > Check the box 'Edit filter
settings' > Save).</p> <p>Microsoft Excel will allow
you to modify only the encoding when saving
(in 'Save As' dialog box > click 'Tools' dropdown
list > Encoding tab).</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What's the difference between Database ID and
External ID?</a></dt>
<dd>
<p>Some fields define a relationship with another
object. For example, the country of a contact is a
link to a record of the 'Country' object. When you
want to import such fields, OpenERP will have to
recreate links between the different records.
To help you import such fields, OpenERP provides 3
mechanisms. You must use one and only one mechanism
per field you want to import.</p> <p>For example, to
reference the country of a contact, OpenERP proposes
you 3 different fields to import: <ul>
<li>Country: the name or code of the country</li>
<li>Country/Database ID: the unique OpenERP ID for a
record, defined by the ID postgresql column</li>
<li>Country/External ID: the ID of this record
referenced in another application (or the .XML file
that imported it)</li> </ul></p> <p>For the country
Belgium, you can use one of these 3 ways to import:
<ul> <li>Country: Belgium</li> <li>Country/Database
ID: 21</li> <li>Country/External ID: base.be</li>
</ul></p> <p>According to your need, you should use
one of these 3 ways to reference records in relations.
Here is when you should use one or the other,
according to your need: <ul> <li>Use Country: This is
the easiest way when your data come from CSV files
that have been created manually.</li> <li>Use
Country/Database ID: You should rarely use this
notation. It's mostly used by developers as it's main
advantage is to never have conflicts (you may have
several records with the same name, but they always
have a unique Database ID)</li> <li>Use
Country/External ID: Use External ID when you import
data from a third party application.</li> </ul></p>
<p>When you use External IDs, you can import CSV files
with the "External ID" column to define the External
ID of each record you import. Then, you will be able
to make a reference to that record with columns like
"Field/External ID". The following two CSV files give
you an example for Products and their Categories.</p>
<a href="/base_import/static/csv/External_id_3rd_party_application_product_categories.csv">CSV file for categories</a><br/>
<a href="/base_import/static/csv/External_id_3rd_party_application_products.csv">CSV file for Products</a>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What can I do if I have multiple matches for a field?
</a></dt>
<dd>
<p>If for example you have two product categories
with the child name "Sellable" (ie. "Misc.
Products/Sellable" &amp; "Other Products/Sellable"),
your validation is halted but you may still import
your data. However, we recommend you do not import the
data because they will all be linked to the first
'Sellable' category found in the Product Category list
("Misc. Products/Sellable"). We recommend you modify
one of the duplicates' values or your product category
hierarchy.<br/>
However if you do not wish to change your
configuration of product categories, we recommend you
use make use of the external ID for this field
'Category'.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How can I import a many2many relationship field
(e.g. a customer that has multiple tags)?</a></dt>
<dd>
<p>The tags should be separated by a comma without any
spacing. For example, if you want you customer to be
lined to both tags 'Manufacturer' and 'Retailer'
then you will encode it as follow "Manufacturer,
Retailer" in the same column of your CSV file.</p>
<a href="/base_import/static/csv/m2m_customers_tags.csv">
CSV file for Manufacturer, Retailer</a><br/>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How can I import a one2many relationship (e.g. several
Order Lines of a Sale Order)?</a></dt>
<dd>
<p>If you want to import sales order having several
order lines; for each order line, you need to reserve
a specific row in the CSV file. The first order line
will be imported on the same row as the information
relative to order. Any additional lines will need an
addtional row that does not have any information in
the fields relative to the order.</p>
<p>As an example, here is
purchase.order_functional_error_line_cant_adpat.CSV
file of some quotations you can import, based on demo
data.</p>
<a href="/base_import/static/csv/purchase.order_functional_error_line_cant_adpat.csv">File for some Quotations</a>
<p>The following CSV file shows how to import purchase
orders with their respective purchase order lines:</p>
<a href="/base_import/static/csv/o2m_purchase_order_lines.csv">Purchase orders with their respective purchase order lines</a>
<p>The following CSV file shows how to import
suppliers and their respective contacts</p>
<a href="/base_import/static/csv/o2m_suppliers_contacts.csv">Suppliers and their respective contacts</a>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
Can I import several times the same record?</a></dt>
<dd>
<p>If you import a file that contains one of the
column "External ID" or "Database ID", records that
have already been imported will be modified instead of
being created. This is very usefull as it allows you
to import several times the same CSV file while having
made some changes in between two imports. OpenERP will
take care of creating or modifying each record
depending if it's new or not.</p> <p> This feature
allows you to use the Import/Export tool of OpenERP to
modify a batch of records in your favorite spreadsheet
application.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
What happens if I do not provide a value for a
specific field?</a></dt>
<dd>
<p>If you do not set all fields in your CSV file,
OpenERP will assign the default value for every non
defined fields. But if you
set fields with empty values in your CSV file, OpenERP
will set the EMPTY value in the field, instead of
assigning the default value.</p>
</dd>
</dl>
<dl>
<dt><a href="#" class="oe_import_toggle">
How to export/import different tables from an SQL
application to OpenERP?</a></dt>
<dd>
<p>If you need to import data from different tables,
you will have to recreate relations between records
belonging to different tables. (e.g. if you import
companies and persons, you will have to recreate the
link between each person and the company they work
for).</p> <p>To manage relations between tables,
you can use the "External ID" facilities of OpenERP.
The "External ID" of a record is the unique identifier
of this record in another application. This "External
ID" must be unique accoss all the records of all
objects, so it's a good practice to prefix this
"External ID" with the name of the application or
table. (like 'company_1', 'person_1' instead of '1')
</p> <p>As an example, suppose you have a SQL database
with two tables you want to import: companies and
persons. Each person belong to one company, so you
will have to recreate the link between a person and
the company he work for. (If you want to test this
example, here is a <a href="/base_import/static/csv/database_import_test.sql">
dump of such a PostgreSQL database</a>).</p>
<p>We will first export all companies and their
"External ID". In PSQL, write the following command:
</p> <p>&#160;&#160;&#160;&#160;copy
(select 'company_'||id as "External ID",company_name
as "Name",'True' as "Is a Company" from companies) TO
'/tmp/company.csv' with CSV HEADER;</p>
<p>This SQL command will create the following CSV file:
<br/>&#160;&#160;&#160;&#160;External ID,Name,Is a Company
<br/>&#160;&#160;&#160;&#160;company_1,Bigees,True
<br/>&#160;&#160;&#160;&#160;company_2,Organi,True
<br/>&#160;&#160;&#160;&#160;company_3,Boum,True</p>
<p>To create the CSV file for persons, linked to
companies, we will use the following SQL command in
PSQL:</p> <p>&#160;&#160;&#160;&#160;copy (select
'person_'||id as "External ID",person_name as
"Name",'False' as "Is a Company",'company_'||company_id
as "Related Company/External ID" from persons) TO
'/tmp/person.csv' with CSV</p>
<p>It will produce the following CSV file:
<br/>&#160;&#160;&#160;&#160;External ID,Name,Is a
Company,Related Company/External ID
<br/>&#160;&#160;&#160;&#160;person_1,Fabien,False,company_1
<br/>&#160;&#160;&#160;&#160;person_2,Laurence,False,company_1
<br/>&#160;&#160;&#160;&#160;person_3,Eric,False,company_2
<br/>&#160;&#160;&#160;&#160;person_4,Ramsy,False,company_3</p>
<p>As you can see in this file, Fabien and Laurence
are working for the Bigees company (company_1) and
Eric is working for the Organi company. The relation
between persons and companies is done using the
External ID of the companies. We had to prefix the
"External ID" by the name of the table to avoid a
conflict of ID between persons and companies (person_1
and company_1 who shared the same ID 1 in the orignial
database).</p>
<p>The two files produced are ready to be imported in
OpenERP without any modifications. After having
imported these two CSV files, you will have 4 contacts
and 3 companies. (the firsts two contacts are linked
to the first company). You must first import the
companies and then the persons.</p>
</dd>
</dl>
</div>
</form>
</t>
<t t-name="ImportView.preview">
<tr t-if="headers" class="oe_import_grid-header">
<td t-foreach="headers" t-as="header" class="oe_import_grid-cell"
+6 -2
View File
@@ -251,7 +251,7 @@ class crm_lead(base_stage, format_address, osv.osv):
'street2': fields.char('Street2', size=128),
'zip': fields.char('Zip', change_default=True, size=24),
'city': fields.char('City', size=128),
'state_id': fields.many2one("res.country.state", 'State', domain="[('country_id','=',country_id)]"),
'state_id': fields.many2one("res.country.state", 'State'),
'country_id': fields.many2one('res.country', 'Country'),
'phone': fields.char('Phone', size=64),
'fax': fields.char('Fax', size=64),
@@ -896,6 +896,10 @@ class crm_lead(base_stage, format_address, osv.osv):
lead.message_post(body=message)
return True
crm_lead()
def onchange_state(self, cr, uid, ids, state_id, context=None):
if state_id:
country_id=self.pool.get('res.country.state').browse(cr, uid, state_id, context).country_id.id
return {'value':{'country_id':country_id}}
return {}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -2
View File
@@ -160,7 +160,7 @@
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
<field name="state_id" options='{"no_open": True}' placeholder="State" class="oe_no_button" style="width: 24%%"/>
<field name="state_id" on_change="onchange_state(state_id)" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
@@ -477,7 +477,7 @@
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
<field name="state_id" options='{"no_open": True}' placeholder="State" class="oe_no_button" style="width: 24%%"/>
<field name="state_id" options='{"no_open": True}' on_change="onchange_state(state_id)" placeholder="State" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
<field name="country_id" placeholder="Country" options='{"no_open": True}'/>
-8
View File
@@ -2,14 +2,6 @@
<openerp>
<data>
<act_window
id="crm_case_categ_phone_create_partner"
name="Schedule a Call"
res_model="crm.phonecall"
view_mode="tree,form,calendar"
context="{'search_default_partner_id': active_id, 'default_duration': 1.0, 'default_partner_id': active_id}"
groups="base.group_sale_salesman"
/>
<!-- TO CONFIRM: This is fine -->
<!-- act_window
+1 -1
View File
@@ -115,7 +115,7 @@
name="%(base_calendar.action_crm_meeting)d"
context="{'search_default_partner_ids': active_id, 'default_partner_ids' : [active_id]}"/>
<button type="action" string="Calls"
name="%(crm.crm_case_categ_phone_create_partner)d"
name="%(crm.crm_case_categ_phone_incoming0)d"
context="{'search_default_partner_id': active_id, 'default_duration': 1.0}" />
<button type="action" string="Opportunities" attrs="{'invisible': [('customer', '=', False)]}"
name="%(crm.crm_case_category_act_oppor11)d" context="{'search_default_partner_id': active_id}"/>
+3 -10
View File
@@ -106,12 +106,6 @@
states="draft,pending" groups="base.group_user"/>
<button name="case_close" string="Done" type="object" class="oe_highlight"
states="open,pending" groups="base.group_user"/>
<button name="case_refuse" string="Refuse" type="object" class="oe_highlight"
states="draft,open,pending" groups="base.group_user"/>
<button name="stage_previous" string="Previous Stage" type="object" groups="base.group_user"
states="open,pending" icon="gtk-go-back" attrs="{'invisible': [('stage_id','=', False)]}"/>
<button name="stage_next" string="Next Stage" type="object" groups="base.group_user"
states="open,pending" icon="gtk-go-forward" attrs="{'invisible': [('stage_id','=', False)]}"/>
<button name="case_reset" string="Reset to Draft" type="object" groups="base.group_user"
states="cancel,done"/>
<button name="case_cancel" string="Cancel" type="object" groups="base.group_user"
@@ -124,13 +118,12 @@
<field name="name"/>
<field name="date"/>
</group>
<group colspan="4" col="6">
<group colspan="4" col="4">
<field name="user_id"/>
<field name="section_id" widget="selection"/>
<field name="state" groups="base.group_no_one"/>
<newline/>
<field name="priority" groups="base.group_user"/>
<field name="section_id"/>
<field name="date_deadline"/>
<field name="state" groups="base.group_no_one"/>
</group>
<group colspan="4" col="4">
<notebook>
+7 -7
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-02-17 03:56+0000\n"
"Last-Translator: Jeff Wang <wjfonhand@hotmail.com>\n"
"PO-Revision-Date: 2012-11-02 01:52+0000\n"
"Last-Translator: Joshua Jan(SHINEIT) <popkar77@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 04:51+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: delivery
#: report:sale.shipping:0
@@ -332,13 +332,13 @@ msgstr "重量"
msgid ""
"Check this box if you want to manage delivery prices that depends on the "
"destination, the weight, the total of the order, etc."
msgstr "如果你要根据目的地、重量、订单总价来管理运费,请勾选这里。"
msgstr "如果要根据目的地、重量、订单总价来管理运费,请勾选这里。"
#. module: delivery
#: help:delivery.carrier,normal_price:0
msgid ""
"Keep empty if the pricing depends on the advanced pricing per destination"
msgstr "如果价格基于每个目的地的固定价格,这里留空。"
msgstr "默认的运费的价格,如果根据目的地定价,这里留空。"
#. module: delivery
#: constraint:stock.move:0
@@ -576,7 +576,7 @@ msgstr "一次性交货"
#. module: delivery
#: field:delivery.carrier,use_detailed_pricelist:0
msgid "Advanced Pricing per Destination"
msgstr "每个目的地的固定价格"
msgstr "根据目的地定价"
#. module: delivery
#: view:delivery.carrier:0
+3 -17
View File
@@ -101,7 +101,7 @@
<form string="Events" version="7.0">
<header>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Event Ended" name="button_done" states="confirm" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Finish Event" name="button_done" states="confirm" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object" groups="base.group_user"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" groups="base.group_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
@@ -288,7 +288,7 @@
<t t-if="record.is_subscribed.raw_value">
<button type="object" name="unsubscribe_to_event" class="oe_unsubscribe_button ">
<span>Subscribed</span>
<span class="unsubscribe">Unsubscribe</span>
<span class="oe_unsubscribe">Unsubscribe</span>
</button>
</t>
</div>
@@ -313,20 +313,6 @@
</field>
</record>
<!-- Event Graph view -->
<record model="ir.ui.view" id="view_event_graph">
<field name="name">Event Graph</field>
<field name="model">event.event</field>
<field name="arch" type="xml">
<graph string="Event by Registration" type="bar" orientation="horizontal">
<field name="name"/>
<field name="register_current" operator="+"/>
<field name="register_prospect" operator="+"/>
</graph>
</field>
</record>
<!-- Event Search View -->
<record model="ir.ui.view" id="view_event_search">
@@ -362,7 +348,7 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">event.event</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,calendar,tree,form,graph</field>
<field name="view_mode">kanban,calendar,tree,form</field>
<field name="context">{"search_default_upcoming":1}</field>
<field name="search_view_id" ref="view_event_search"/>
<field name="help" type="html">
+1 -1
View File
@@ -23,7 +23,7 @@
<separator string="Connection with username and password" colspan="4"/>
<label string="Another approach is to create a user for OpenERP in Moodle. If you do so, make sure that this user has appropriate access rights." colspan="4"/>
<field name="moodle_username"/>
<field name="moodle_password"/>
<field name="moodle_password" password="True"/>
</group>
</form>
</field>
+3 -3
View File
@@ -24,9 +24,9 @@
<field name="arch" type="xml">
<form string="Incoming Mail Server" version="7.0">
<header attrs="{'invisible' : [('type', '=', 'local')]}">
<button string="Test &amp; Confirm" type="object" name="button_confirm_login" states="draft" icon="gtk-apply"/>
<button string="Fetch Now" type="object" name="fetch_mail" states="done" icon="gtk-network"/>
<button string="Reset Confirmation" type="object" name="set_draft" icon="gtk-convert" states="done"/>
<button string="Test &amp; Confirm" type="object" name="button_confirm_login" states="draft"/>
<button string="Fetch Now" type="object" name="fetch_mail" states="done"/>
<button string="Reset Confirmation" type="object" name="set_draft" states="done"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
+15 -2
View File
@@ -188,8 +188,6 @@
</field>
</record>
<menuitem id="next_id_49" name="Expenses" sequence="15" parent="hr.menu_hr_root"/>
<menuitem action="expense_all" id="menu_expense_all" name="Expenses" parent="next_id_49"/>
<record id="view_product_hr_expense_form" model="ir.ui.view">
<field name="name">product.product.expense.form</field>
@@ -203,5 +201,20 @@
</field>
</record>
<record id="hr_expense_product" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">product.product</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{"default_hr_expense_ok":1}</field>
<field name="domain">[('hr_expense_ok','=',True)]</field>
<field name="search_view_id" ref="product.product_search_form_view"/>
</record>
<menuitem id="menu_product_hr_config_expense" name="Expenses" parent="hr.menu_hr_configuration"/>
<menuitem id="menu_hr_product" name="Products" parent="menu_product_hr_config_expense" action="hr_expense_product"/>
<menuitem id="next_id_49" name="Expenses" sequence="15" parent="hr.menu_hr_root"/>
<menuitem action="expense_all" id="menu_expense_all" name="Expenses" parent="next_id_49"/>
</data>
</openerp>
@@ -94,13 +94,13 @@ class account_analytic_account(osv.osv):
def set_close(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'close'}, context=context)
message = _("Contract has been <b>closed</b>.")
self.message_post(cr, uid, ids, body=message, subtype="mt_account_closed", context=context)
self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_closed", context=context)
return True
def set_cancel(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'cancelled'}, context=context)
message = _("Contract has been <b>canceled</b>.")
self.message_post(cr, uid, ids, body=message, subtype="mt_account_canceled", context=context)
self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_canceled", context=context)
return True
def set_open(self, cr, uid, ids, context=None):
@@ -21,5 +21,16 @@
<field name="customer_name">80%</field>
<field name="factor">20.0</field>
</record>
<!-- mail: subtypes -->
<record id="mt_account_closed" model="mail.message.subtype">
<field name="name">finished</field>
<field name="res_model">account.analytic.account</field>
</record>
<record id="mt_account_canceled" model="mail.message.subtype">
<field name="name">canceled</field>
<field name="res_model">account.analytic.account</field>
</record>
</data>
</openerp>
@@ -19,10 +19,10 @@
<xpath expr="/form/sheet" position='before'>
<header>
<button name="set_pending" string="Pending" type="object" states="open" />
<button name="set_close" string="Close" type="object" states="open,pending" />
<button name="set_close" string="Contract Finished" type="object" states="open,pending" />
<button name="set_open" string="Re-open project" type="object" states="pending,close" />
<button name="set_open" string="Re-open project" type="object" states="cancelled,draft"/>
<button name="set_cancel" string="Cancel" type="object" states="open,pending"/>
<button name="set_cancel" string="Cancel Contract" type="object" states="open,pending"/>
<field name="state" readonly="1" widget="statusbar"
statusbar_visible="open,pending,close" statusbar_colors='{"pending":"red", "template":"blue"}'/>
</header>
+5 -5
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-08-18 17:34+0000\n"
"Last-Translator: Heling Yao <Unknown>\n"
"PO-Revision-Date: 2012-11-01 08:13+0000\n"
"Last-Translator: ccdos <ccdos@163.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:14+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: hr_timesheet_sheet
#: field:hr.analytic.timesheet,sheet_id:0 field:hr.attendance,sheet_id:0
@@ -967,7 +967,7 @@ msgstr "你只能做今天的签入/签出"
#. module: hr_timesheet_sheet
#: view:hr_timesheet_sheet.sheet:0
msgid "Submit to Manager"
msgstr ""
msgstr "提交给经理"
#. module: hr_timesheet_sheet
#: field:hr_timesheet_sheet.sheet,account_ids:0
@@ -26,7 +26,6 @@
<field name="product_id" invisible="1"/>
<field name="account_id" invisible="1" groups="analytic.group_analytic_accounting"/>
<field name="general_account_id" invisible="1"/>
<field name="quantity" sum="Hours"/>
<field name="cost" sum="Total Cost"/>
</tree>
@@ -32,6 +32,7 @@ class timesheet_report(osv.osv):
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'date': fields.date('Date', readonly=True),
'name': fields.char('Description', size=64,readonly=True),
'product_id' : fields.many2one('product.product', 'Product'),
'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
@@ -63,6 +64,7 @@ class timesheet_report(osv.osv):
select
min(aal.id) as id,
htss.name,
aal.date as date,
htss.date_from,
htss.date_to,
to_char(htss.date_from, 'YYYY-MM-DD') as day,
@@ -96,6 +98,7 @@ class timesheet_report(osv.osv):
left join hr_timesheet_sheet_sheet as htss ON (hat.line_id=htss.id)
group by
aal.account_id,
aal.date,
htss.date_from,
htss.date_to,
aal.unit_amount,
@@ -17,6 +17,7 @@
<field name="model">timesheet.report</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';black:state in ('confirm','new');gray:state == 'cancel'" string="Timesheet">
<field name="date" invisible="1"/>
<field name="name" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="date_from" invisible="1"/>
+1 -1
View File
@@ -473,7 +473,7 @@
<field name="name">CODA Statement Lines</field>
<field name="res_model">coda.bank.statement.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph,form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'block_statement_line_delete' : 1}</field>
<field name="search_view_id" ref="view_coda_bank_statement_line_filter"/>
<field name="view_id" ref="view_coda_bank_statement_line_list"/>
+19 -20
View File
@@ -156,26 +156,25 @@ class mail_thread(osv.AbstractModel):
old = set(fol.partner_id.id for fol in fol_obj.browse(cr, SUPERUSER_ID, fol_ids))
new = set(old)
if value:
for command in value:
if isinstance(command, (int, long)):
new.add(command)
elif command[0] == 0:
new.add(partner_obj.create(cr, uid, command[2], context=context))
elif command[0] == 1:
partner_obj.write(cr, uid, [command[1]], command[2], context=context)
new.add(command[1])
elif command[0] == 2:
partner_obj.unlink(cr, uid, [command[1]], context=context)
new.discard(command[1])
elif command[0] == 3:
new.discard(command[1])
elif command[0] == 4:
new.add(command[1])
elif command[0] == 5:
new.clear()
elif command[0] == 6:
new = set(command[2])
for command in value or []:
if isinstance(command, (int, long)):
new.add(command)
elif command[0] == 0:
new.add(partner_obj.create(cr, uid, command[2], context=context))
elif command[0] == 1:
partner_obj.write(cr, uid, [command[1]], command[2], context=context)
new.add(command[1])
elif command[0] == 2:
partner_obj.unlink(cr, uid, [command[1]], context=context)
new.discard(command[1])
elif command[0] == 3:
new.discard(command[1])
elif command[0] == 4:
new.add(command[1])
elif command[0] == 5:
new.clear()
elif command[0] == 6:
new = set(command[2])
# remove partners that are no longer followers
fol_ids = fol_obj.search(cr, SUPERUSER_ID,
+1 -1
View File
@@ -124,7 +124,7 @@
<field name="act_window_id" ref="action_membership_products"/>
</record>
<menuitem name="Association" id="base.menu_association" icon="terp-calendar" sequence="9"/>
<menuitem name="Association" id="base.menu_association" icon="terp-calendar" sequence="10"/>
<menuitem name="Members" id="menu_membership" sequence="0" parent="base.menu_association"/>
<menuitem name="Configuration" id="base.menu_marketing_config_association"
parent="base.menu_association" sequence="30"/>
+21 -21
View File
@@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:49+0000\n"
"PO-Revision-Date: 2011-01-12 15:34+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2012-11-01 19:12+0000\n"
"Last-Translator: Dusan Laznik <laznik@mentis.si>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 04:50+0000\n"
"X-Generator: Launchpad (build 16206)\n"
"X-Launchpad-Export-Date: 2012-11-02 05:09+0000\n"
"X-Generator: Launchpad (build 16218)\n"
#. module: mrp
#: view:mrp.routing.workcenter:0
@@ -34,7 +34,7 @@ msgstr ""
#. module: mrp
#: help:mrp.production,location_src_id:0
msgid "Location where the system will look for components."
msgstr "Lokacije, kjer bo sistem iskal komponente"
msgstr ""
#. module: mrp
#: field:mrp.production,workcenter_lines:0
@@ -59,7 +59,7 @@ msgstr "Število ciklov"
#. module: mrp
#: model:product.uom.categ,name:mrp.product_uom_categ_fluid
msgid "Fluid"
msgstr ""
msgstr "Tekočina"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_minimumstockprocure0
@@ -155,7 +155,7 @@ msgstr ""
#. module: mrp
#: view:mrp.production:0
msgid "Products to Finish"
msgstr "Produkti za dokončanje"
msgstr "Izdelki za dokončanje"
#. module: mrp
#: selection:mrp.bom,method:0
@@ -166,7 +166,7 @@ msgstr ""
#: view:mrp.production:0
#: field:mrp.production,state:0
msgid "State"
msgstr "Stanje"
msgstr "Status"
#. module: mrp
#: field:mrp.workcenter,costs_hour:0
@@ -176,7 +176,7 @@ msgstr "Strošek na uro"
#. module: mrp
#: model:product.template,name:mrp.product_orange_product_template
msgid "Orange"
msgstr ""
msgstr "Pomaranča"
#. module: mrp
#: model:process.transition,note:mrp.process_transition_servicemts0
@@ -188,7 +188,7 @@ msgstr ""
#. module: mrp
#: view:mrp.production:0
msgid "UOM"
msgstr "ME"
msgstr "EM"
#. module: mrp
#: field:change.production.qty,product_qty:0
@@ -241,7 +241,7 @@ msgstr "["
#. module: mrp
#: model:process.transition,name:mrp.process_transition_procureserviceproduct0
msgid "Procurement of services"
msgstr ""
msgstr "Nabava storitev"
#. module: mrp
#: view:mrp.workcenter:0
@@ -279,7 +279,7 @@ msgstr "Partnerjev sklic"
#: field:mrp.production,origin:0
#: report:mrp.production.order:0
msgid "Source Document"
msgstr ""
msgstr "Izvorni dokument"
#. module: mrp
#: field:mrp.production,product_lines:0
@@ -329,13 +329,13 @@ msgstr ""
#. module: mrp
#: view:mrp.bom:0
msgid "Default UOM"
msgstr ""
msgstr "Privzeta EM"
#. module: mrp
#: sql_constraint:mrp.production:0
#: sql_constraint:stock.picking:0
msgid "Reference must be unique per Company!"
msgstr ""
msgstr "Referenca mora biti enoznačna"
#. module: mrp
#: code:addons/mrp/report/price.py:139
@@ -441,7 +441,7 @@ msgstr ""
#. module: mrp
#: sql_constraint:res.company:0
msgid "The company name must be unique !"
msgstr ""
msgstr "Ime podjetja mora biti unikatno !"
#. module: mrp
#: model:ir.actions.act_window,help:mrp.mrp_property_group_action
@@ -463,7 +463,7 @@ msgstr ""
#. module: mrp
#: model:process.node,note:mrp.process_node_serviceproduct1
msgid "For Services."
msgstr ""
msgstr "Za storitve."
#. module: mrp
#: help:mrp.workcenter,costs_cycle_account_id:0
@@ -494,7 +494,7 @@ msgstr ""
#. module: mrp
#: constraint:product.product:0
msgid "Error: Invalid ean code"
msgstr ""
msgstr "Napaka: neveljavna EAN črtna koda"
#. module: mrp
#: field:mrp.production,move_created_ids:0
@@ -564,7 +564,7 @@ msgstr ""
#: field:mrp.production,product_uom:0
#: field:mrp.production.product.line,product_uom:0
msgid "Product UOM"
msgstr "ME proizvoda"
msgstr "EM"
#. module: mrp
#: selection:mrp.production,state:0
@@ -611,7 +611,7 @@ msgstr ""
#: code:addons/mrp/procurement.py:43
#, python-format
msgid "No BoM defined for this product !"
msgstr ""
msgstr "Izdelek nima kosovnice"
#. module: mrp
#: model:ir.actions.act_window,name:mrp.mrp_bom_form_action2
@@ -622,12 +622,12 @@ msgstr ""
#. module: mrp
#: model:ir.model,name:mrp.model_stock_move
msgid "Stock Move"
msgstr ""
msgstr "Prenos zaloge"
#. module: mrp
#: model:ir.ui.menu,name:mrp.menu_mrp_planning
msgid "Planning"
msgstr ""
msgstr "Načrtovanje"
#. module: mrp
#: view:mrp.production:0
+2 -27
View File
@@ -192,7 +192,7 @@ class mrp_bom(osv.osv):
return res
_columns = {
'name': fields.char('Name', size=64, required=True),
'name': fields.char('Name', size=64),
'code': fields.char('Reference', size=16),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the bills of material without removing it."),
'type': fields.selection([('normal','Normal BoM'),('phantom','Sets / Phantom')], 'BoM Type', required=True,
@@ -420,28 +420,6 @@ class mrp_production(osv.osv):
result[prod.id]['cycle_total'] += wc.cycle
return result
def _production_date_end(self, cr, uid, ids, prop, unknow_none, context=None):
""" Finds production end date.
@param prop: Name of field.
@param unknow_none:
@return: Dictionary of values.
"""
result = {}
for prod in self.browse(cr, uid, ids, context=context):
result[prod.id] = prod.date_planned
return result
def _production_date(self, cr, uid, ids, prop, unknow_none, context=None):
""" Finds production planned date.
@param prop: Name of field.
@param unknow_none:
@return: Dictionary of values.
"""
result = {}
for prod in self.browse(cr, uid, ids, context=context):
result[prod.id] = prod.date_planned[:10]
return result
def _src_id_default(self, cr, uid, ids, context=None):
src_location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context)
return src_location_id.id
@@ -469,13 +447,9 @@ class mrp_production(osv.osv):
'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True,
readonly=True, states={'draft':[('readonly',False)]},
help="Location where the system will stock the finished products."),
'date_planned_end': fields.function(_production_date_end, type='date', string='Scheduled End Date'),
'date_planned_date': fields.function(_production_date, type='date', string='Scheduled Date'),
'date_planned': fields.datetime('Scheduled Date', required=True, select=1, readonly=True, states={'draft':[('readonly',False)]}),
'date_start': fields.datetime('Start Date', select=True, readonly=True),
'date_finished': fields.datetime('End Date', select=True, readonly=True),
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)], readonly=True, states={'draft':[('readonly',False)]},
help="Bill of Materials allow you to define the list of required raw materials to make a finished product."),
'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft':[('readonly',False)]},
@@ -515,6 +489,7 @@ class mrp_production(osv.osv):
'state': lambda *a: 'draft',
'date_planned': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'product_qty': lambda *a: 1.0,
'user_id': lambda self, cr, uid, c: uid,
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/',
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c),
'location_src_id': _src_id_default,
+6 -6
View File
@@ -366,7 +366,7 @@
</div>
</group>
<group>
<field name="name" class="oe_inline"/>
<field name="name" groups="base.group_no_one"/>
<field name="code" string="Reference"/>
<field name="type"/>
<p colspan="2" class="oe_grey" attrs="{'invisible': [('type','=','normal')]}">
@@ -442,11 +442,11 @@
<field name="arch" type="xml">
<tree string="Bill of Materials" colors="blue:method">
<field name="sequence" invisible="1"/>
<field name="name"/>
<field name="code"/>
<field name="name" invisible="1"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="code"/>
<field name="type"/>
<field name="method"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
@@ -462,9 +462,9 @@
<field name="arch" type="xml">
<tree string="BoM Structure" colors="blue:method">
<field name="sequence" invisible="1"/>
<field name="name" string="Component Name"/>
<field name="name" groups="base.group_no_one"/>
<field name="code"/>
<field name="product_id" string="Component Product"/>
<field name="product_id"/>
<field name="bom_id"/>
<field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/>
@@ -606,7 +606,7 @@
<field name="model">mrp.production</field>
<field name="arch" type="xml">
<graph string="Manufacturing Orders" type="bar">
<field name="date_planned_date"/>
<field name="date_planned"/>
<field name="hour_total" operator="+"/>
<field name="cycle_total" operator="+"/>
</graph>
-12
View File
@@ -50,17 +50,6 @@ class stock_move(osv.osv):
stock_move()
class mrp_production_workcenter_line(osv.osv):
def _get_date_date(self, cr, uid, ids, field_name, arg, context=None):
""" Finds starting date.
@return: Dictionary of values.
"""
res={}
for op in self.browse(cr, uid, ids, context=context):
if op.date_start:
res[op.id] = op.date_start[:10]
else:
res[op.id]=False
return res
def _get_date_end(self, cr, uid, ids, field_name, arg, context=None):
""" Finds ending date.
@@ -92,7 +81,6 @@ class mrp_production_workcenter_line(osv.osv):
"* When work order is in running mode, during that time if user wants to stop or to make changes in order then can set in 'Pending' status.\n" \
"* When the user cancels the work order it will be set in 'Canceled' status.\n" \
"* When order is completely processed that time it is set in 'Finished' status."),
'date_start_date': fields.function(_get_date_date, string='Start Date', type='date'),
'date_planned': fields.datetime('Scheduled Date', select=True),
'date_planned_end': fields.function(_get_date_end, string='End Date', type='datetime'),
'date_start': fields.datetime('Start Date'),
@@ -328,7 +328,7 @@
<field name="model">mrp.production.workcenter.line</field>
<field name="arch" type="xml">
<graph string="Hours by Work Center" type="bar">
<field name="date_start_date"/>
<field name="date_start"/>
<field name="hour" operator="+"/>
<field name="workcenter_id" group="True"/>
</graph>
-4
View File
@@ -39,10 +39,6 @@
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,done"/>
</header>
<sheet string="Repairs order">
<label for="product_id" class="oe_edit_only"/>
<h1>
</h1>
<label for="name" class="oe_edit_only"/>
<h1>
Repair Order <field name="name" class="oe_inline"/>
</h1>
+1 -1
View File
@@ -144,7 +144,7 @@
<record id="trans_ready_repair_start" model="workflow.transition">
<field name="act_from" ref="act_repair_ready"/>
<field name="act_to" ref="act_repair_start"/>
<field name="signal">action_repair_start</field>
<field name="signal">repair_ready</field>
</record>
<record id="trans_repair_repair_end" model="workflow.transition">
@@ -22,7 +22,7 @@
-
I start the Repairing process by clicking on "Start Repair" button.
-
!workflow {model: mrp.repair, action: action_repair_start, ref: mrp_repair_rmrp2}
!workflow {model: mrp.repair, action: repair_ready, ref: mrp_repair_rmrp2}
-
Repairing process for this product is in Done state and I end this process by clicking on "End Repair" button for Invoice Method 'Before Repair'.
-
+1 -1
View File
@@ -186,7 +186,7 @@ function openerp_pos_models(instance, module){ //module is instance.point_of_sal
return self.fetch('account.journal', undefined, [['id','in', journals]]);
}).pipe(function(journals){
self.set('journals',journals);
// associate the bank statements with their journals.
var bank_statements = self.get('bank_statements');
for(var i = 0, ilen = bank_statements.length; i < ilen; i++){
+3 -3
View File
@@ -543,7 +543,7 @@
<div class="pos-sale-ticket">
<div class="pos-right-align"><t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate + ' ' +
Date.CultureInfo.formatPatterns.longTime)"/><li><t t-esc="widget.currentOrder.attributes.name"/></li></div>
Date.CultureInfo.formatPatterns.longTime)"/><t t-esc="widget.currentOrder.attributes.name"/></div>
<br />
<t t-esc="widget.company.name"/><br />
Phone: <t t-esc="widget.company.phone || ''"/><br />
@@ -555,9 +555,9 @@
<td>
<t t-esc="order.get_product().get('name')"/>
<t t-if="order.get_discount() > 0">
<li class="pos-disc-font">
<div class="pos-disc-font">
With a <t t-esc="order.get_discount()"/>% discount
</li>
</div>
</t>
</td>
<td class="pos-right-align">
+2 -2
View File
@@ -561,10 +561,10 @@ class stock_warehouse_orderpoint(osv.osv):
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'product_min_qty': fields.float('Minimum Quantity', required=True,
help="When the virtual stock goes below the Min Quantity specified for this field, OpenERP generates "\
"a procurement to bring the virtual stock to the Max Quantity."),
"a procurement to bring the forecasted quantity to the Max Quantity."),
'product_max_qty': fields.float('Maximum Quantity', required=True,
help="When the virtual stock goes below the Min Quantity, OpenERP generates "\
"a procurement to bring the virtual stock to the Quantity specified as Max Quantity."),
"a procurement to bring the forecasted quantity to the Quantity specified as Max Quantity."),
'qty_multiple': fields.integer('Qty Multiple', required=True,
help="The procurement quantity will be rounded up to this multiple."),
'procurement_id': fields.many2one('procurement.order', 'Latest procurement', ondelete="set null"),
@@ -111,9 +111,11 @@ class account_invoice_line(osv.osv):
if res_dict.get('item_id',False) and res_dict['item_id'].get(pricelist,False):
item = res_dict['item_id'].get(pricelist,False)
item_base = item_obj.read(cr, uid, [item], ['base'])[0]['base']
if item_base > 0:
field_name = price_type_obj.browse(cr, uid, item_base).field
item_read = item_obj.read(cr, uid, [item], ['base'])
if item_read:
item_base = item_read[0]['base']
if item_base > 0:
field_name = price_type_obj.browse(cr, uid, item_base).field
product = product_obj.browse(cr, uid, product_id, context)
product_read = product_obj.read(cr, uid, product_id, [field_name], context=context)
+41 -5
View File
@@ -178,7 +178,18 @@ class project(osv.osv):
res = super(project, self).unlink(cr, uid, ids, *args, **kwargs)
mail_alias.unlink(cr, uid, alias_ids, *args, **kwargs)
return res
def _get_attached_docs(self, cr, uid, ids, field_name, arg, context):
res = {}
attachment = self.pool.get('ir.attachment')
task = self.pool.get('project.task')
for id in ids:
project_attachments = attachment.search(cr, uid, [('res_model', '=', 'project.project'), ('res_id', 'in', [id])], context=context, count=True)
task_ids = task.search(cr, uid, [('project_id', 'in', [id])], context=context)
task_attachments = attachment.search(cr, uid, [('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)], context=context, count=True)
res[id] = project_attachments or 0 + task_attachments or 0
return res
def _task_count(self, cr, uid, ids, field_name, arg, context=None):
res = dict.fromkeys(ids, 0)
task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
@@ -189,7 +200,26 @@ class project(osv.osv):
def _get_alias_models(self, cr, uid, context=None):
"""Overriden in project_issue to offer more options"""
return [('project.task', "Tasks")]
def attachment_tree_view(self, cr, uid, ids, context):
task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
domain = [
('|',
'&', 'res_model', '=', 'project.project'), ('res_id', 'in', ids),
'&', ('res_model', '=', 'project.task'), ('res_id', 'in', task_ids)
]
res_id = ids and ids[0] or False
return {
'name': _('Attachments'),
'domain': domain,
'res_model': 'ir.attachment',
'type': 'ir.actions.act_window',
'view_id': False,
'view_mode': 'tree,form',
'view_type': 'form',
'limit': 80,
'context': "{'default_res_model': '%s','default_res_id': %d}" % (self._name, res_id)
}
# Lambda indirection method to avoid passing a copy of the overridable method when declaring the field
_alias_models = lambda self, *args, **kwargs: self._get_alias_models(*args, **kwargs)
_columns = {
@@ -232,6 +262,7 @@ class project(osv.osv):
help="The kind of document created when an email is received on this project's email alias"),
'privacy_visibility': fields.selection([('public','Public'), ('followers','Followers Only')], 'Privacy / Visibility', required=True),
'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'), ('cancelled', 'Cancelled'),('pending','Pending'),('close','Closed')], 'Status', required=True,),
'doc_count':fields.function(_get_attached_docs, string="Number of documents attached", type='int')
}
def _get_type_common(self, cr, uid, context):
@@ -728,11 +759,11 @@ class task(base_stage, osv.osv):
If the case needs to be reviewed then the status is \
set to \'Pending\'.'),
'categ_ids': fields.many2many('project.category', string='Tags'),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State',
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State',
help="A task's kanban state indicates special situations affecting it:\n"
" * Normal is the default situation\n"
" * Blocked indicates something is preventing the progress of this task\n"
" * Ready To Pull indicates the task is ready to be pulled to the next stage",
" * Ready for next stage indicates the task is ready to be pulled to the next stage",
readonly=True, required=False),
'create_date': fields.datetime('Create Date', readonly=True,select=True),
'date_start': fields.datetime('Starting Date',select=True),
@@ -792,6 +823,11 @@ class task(base_stage, osv.osv):
"""
return self.write(cr, uid, ids, {'priority' : priority})
def set_very_high_priority(self, cr, uid, ids, *args):
"""Set task priority to very high
"""
return self.set_priority(cr, uid, ids, '0')
def set_high_priority(self, cr, uid, ids, *args):
"""Set task priority to high
"""
@@ -1398,7 +1434,7 @@ class project_task_history(osv.osv):
'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select=True),
'type_id': fields.many2one('project.task.type', 'Stage'),
'state': fields.selection([('draft', 'New'), ('cancelled', 'Cancelled'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done')], 'Status'),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State', required=False),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State', required=False),
'date': fields.date('Date', select=True),
'end_date': fields.function(_get_date, string='End Date', type="date", store={
'project.task.history': (_get_related_date, None, 20)
+19 -11
View File
@@ -63,8 +63,8 @@
<field name="arch" type="xml">
<form string="Project" version="7.0">
<header>
<button name="set_done" string="Close Project" type="object" states="open,pending"/>
<button name="set_open" string="Re-open project" type="object" states="pending" class="oe_highlight"/>
<button name="set_done" string="Close Project" type="object" states="open,pending"/>
<button name="set_open" string="Re-open project" type="object" states="cancelled,close"/>
<button name="set_pending" string="Pending" type="object" states="open"/>
<button name="set_template" string="Set as Template" type="object" states="open"/>
@@ -88,7 +88,7 @@
<div class="oe_right oe_button_box" name="buttons">
<button name="%(act_project_project_2_project_task_all)d" string="Tasks"
type="action" attrs="{'invisible':[('use_tasks','=', 0)]}"/>
<button name="%(base.action_attachment)d" string="Documents" type="action"/>
<button name="attachment_tree_view" string="Documents" type="object"/>
</div>
<group>
<group>
@@ -223,6 +223,7 @@
<field name="task_count"/>
<field name="alias_id"/>
<field name="alias_domain"/>
<field name="doc_count"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_global_click">
@@ -238,7 +239,13 @@
<h4><field name="name"/></h4>
<div class="oe_kanban_project_list">
<a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px"> <field name="task_count"/> Tasks</a>
<a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px">
<span t-if="record.task_count.raw_value gt 1"><field name="task_count"/> Tasks</span>
<span t-if="record.task_count.raw_value lt 2"><field name="task_count"/> Task</span>
</a>
</div>
<div class="oe_kanban_project_list">
<a t-if="record.doc_count.raw_value" name="attachment_tree_view" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a>
</div>
<div class="oe_kanban_footer_left">
<span groups="project.group_time_work_estimation_tasks">
@@ -389,7 +396,7 @@
states="cancelled,done" context="{'button_reactivate':True}" groups="base.group_user"/>
<button name="action_close" string="Done" type="object"
states="draft,open,pending" groups="base.group_user"/>
<button name="do_cancel" string="Cancel" type="object"
<button name="do_cancel" string="Cancel Task" type="object"
states="draft,open,pending" groups="base.group_user"/>
<field name="stage_id" widget="statusbar" clickable="True"/>
</header>
@@ -403,12 +410,15 @@
<field name="project_id" on_change="onchange_project(project_id)" context="{'default_use_tasks':1}"/>
<field name="user_id" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}" options='{"no_open": True}'/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="planned_hours" widget="float_time"
groups="project.group_time_work_estimation_tasks"
on_change="onchange_planned(planned_hours, effective_hours)"/>
</group>
<group>
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
<field name="categ_ids" widget="many2many_tags"/>
<field name="progress" widget="progressbar"
groups="project.group_time_work_estimation_tasks"/>
groups="project.group_time_work_estimation_tasks" attrs="{'invisible':[('state','=','cancelled')]}"/>
</group>
</group>
<notebook>
@@ -458,9 +468,6 @@
<field name="priority" groups="base.group_user"/>
<field name="sequence"/>
<field name="partner_id"/>
<field name="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}"
groups="project.group_time_work_estimation_tasks"
on_change="onchange_planned(planned_hours, effective_hours)"/>
<field name="state" invisible="1"/>
</group>
</page>
@@ -525,10 +532,11 @@
</div>
<div class="oe_kanban_bottom_right">
<a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Stage Done" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready for next stage" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a>
<a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a>
<a t-if="record.priority.raw_value == 1" type="object" string="Priority" name="set_normal_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value != 1" type="object" string="Priority" name="set_high_priority" class="oe_e oe_star_off">7</a>
<a t-if="record.priority.raw_value == 2" type="object" string="Important" name="set_very_high_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value == 1 or record.priority.raw_value == 3 or record.priority.raw_value == 4" type="object" string="Normal" name="set_normal_priority" class="oe_e oe_star_off">7</a>
<a t-if="record.priority.raw_value == 0" type="object" string="Very Important" name="set_high_priority" class="oe_e oe_star_very_high_priority">7</a>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
<div class="oe_kanban_footer_left">
+17 -1
View File
@@ -2,13 +2,29 @@
margin: 2px;
}
.openerp .oe_kanban_view .oe_kanban_content .oe_star_very_high_priority {
color: #cccccc;
text-shadow: 0 0 2px black;
vertical-align: top;
position: relative;
top: -5px;
}
.openerp .oe_kanban_view .oe_kanban_content .oe_star_very_high_priority:hover {
text-decoration: none;
}
.openerp .oe_kanban_view .oe_kanban_content .oe_star_very_high_priority {
color: red;
}
.oe_kanban_project {
width: 220px;
min-height: 160px;
}
.oe_kanban_project_list {
.oe_kanban_project_list > a > span:hover{
margin: 4px 0;
text-decoration: underline;
}
.openerp .oe_kanban_content h4 {
+11 -1
View File
@@ -57,6 +57,12 @@ openerp.project = function(openerp) {
} else if (self.dataset.model === 'project.task') {
self.project_display_categ_names();
}
},
on_record_moved: function(record, old_group, old_index, new_group, new_index){
var self = this;
this._super.apply(this, arguments);
if(new_group.state.folded)
new_group.do_action_toggle_fold();
}
});
@@ -67,6 +73,10 @@ openerp.project = function(openerp) {
} else {
this._super.apply(this, arguments);
}
}
},
bind_events: function() {
this._super();
this.view.project_display_categ_names();
},
});
};
+1 -1
View File
@@ -240,7 +240,7 @@ class project_issue(base_stage, osv.osv):
'date_closed': fields.datetime('Closed', readonly=True,select=True),
'date': fields.datetime('Date'),
'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),
'categ_ids': fields.many2many('project.category', string='Categories'),
'categ_ids': fields.many2many('project.category', string='Tags'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
'version_id': fields.many2one('project.issue.version', 'Version'),
'stage_id': fields.many2one ('project.task.type', 'Stage',
+4 -6
View File
@@ -125,15 +125,11 @@
<field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}" class="oe_inline"/>
</div>
<field name="categ_ids" widget="many2many_tags"/>
<field name="version_id"/>
</group>
</group>
<notebook>
<page string="Description">
<group>
<group>
<field name="version_id" widget="selection"/>
</group>
</group>
<field name="description" placeholder="Add a description..."/>
</page>
<page string="Extra Info" groups="base.group_no_one">
@@ -380,7 +376,9 @@
<xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
<a t-if="record.use_issues.raw_value" style="margin-right: 10px"
name="%(act_project_project_2_project_issue_all)d" type="action">
<field name="issue_count"/> Issues</a>
<span t-if="record.issue_count.raw_value gt 1"><field name="issue_count"/> Issues</span>
<span t-if="record.issue_count.raw_value lt 2"><field name="issue_count"/> Issue</span>
</a>
</xpath>
</field>
</record>
@@ -63,7 +63,6 @@
<filter string="Sale Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" />
<filter string="Project" name="project" icon="terp-folder-violet" context="{'group_by':'project_id'}" />
<filter string="Task" icon="terp-stock_align_left_24" domain="[]" context="{'group_by':'task_id'}"/>
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}" />
<filter string="Version" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'version_id'}"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
@@ -120,7 +120,10 @@
</field>
<xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
<a t-if="record.use_phases.raw_value"
name="%(act_project_phases)d" type="action">Phases(<field name="phase_count"/>)</a>
name="%(act_project_phases)d" type="action">
<span t-if="record.phase_count.raw_value gt 1">Phases(<field name="phase_count"/>)</span>
<span t-if="record.phase_count.raw_value lt 2">Phase(<field name="phase_count"/>)</span>
</a>
</xpath>
</field>
</record>
@@ -86,7 +86,7 @@ class project_work(osv.osv):
emp = emp_obj.browse(cr, uid, emp_id[0])
if not emp.product_id:
raise osv.except_osv(_('Bad Configuration !'),
_('Please define product on the related employee.\nFill in the timesheet tab of the employee form.'))
_('Please define product and product category property account on the related employee.\nFill in the HR Settings tab of the employee form.'))
if not emp.journal_id:
raise osv.except_osv(_('Bad Configuration !'),
@@ -86,11 +86,9 @@
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="view_id" ref="view_account_analytic_line_tree_inherit_account_id"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a work to invoice.
</p><p>
You will find here all works made on tasks that you can
invoice.
<p>
You will find here timesheets and purchases you did for contracts that can be reinvoiced to the customer.
If you want to record new jobs to invoice, you should use the timesheet menu instead.
</p>
</field>
</record>
+27 -9
View File
@@ -137,6 +137,17 @@ class purchase_order(osv.osv):
invoiced = True
res[purchase.id] = invoiced
return res
def _get_journal(self, cr, uid, context=None):
if context is None:
context = {}
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
company_id = context.get('company_id', user.company_id.id)
journal_obj = self.pool.get('account.journal')
res = journal_obj.search(cr, uid, [('type', '=', 'purchase'),
('company_id', '=', company_id)],
limit=1)
return res and res[0] or False
STATE_SELECTION = [
('draft', 'Draft PO'),
@@ -204,6 +215,7 @@ class purchase_order(osv.osv):
'product_id': fields.related('order_line','product_id', type='many2one', relation='product.product', string='Product'),
'create_uid': fields.many2one('res.users', 'Responsible'),
'company_id': fields.many2one('res.company','Company',required=True,select=1),
'journal_id': fields.many2one('account.journal', 'Journal'),
}
_defaults = {
'date_order': fields.date.context_today,
@@ -214,6 +226,7 @@ class purchase_order(osv.osv):
'invoiced': 0,
'pricelist_id': lambda self, cr, uid, context: context.get('partner_id', False) and self.pool.get('res.partner').browse(cr, uid, context['partner_id']).property_product_pricelist_purchase.id,
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'purchase.order', context=c),
'journal_id': _get_journal,
}
_sql_constraints = [
('name_uniq', 'unique(name, company_id)', 'Order Reference must be unique per Company!'),
@@ -890,14 +903,16 @@ class purchase_order_line(osv.osv):
account_tax = self.pool.get('account.tax')
# - check for the presence of partner_id and pricelist_id
if not partner_id:
raise osv.except_osv(_('No Partner!'), _('Select a partner in purchase order to choose a product.'))
if not pricelist_id:
raise osv.except_osv(_('No Pricelist !'), _('Select a price list in the purchase order form before choosing a product.'))
#if not partner_id:
# raise osv.except_osv(_('No Partner!'), _('Select a partner in purchase order to choose a product.'))
#if not pricelist_id:
# raise osv.except_osv(_('No Pricelist !'), _('Select a price list in the purchase order form before choosing a product.'))
# - determine name and notes based on product in partner lang.
lang = res_partner.browse(cr, uid, partner_id).lang
context_partner = {'lang': lang, 'partner_id': partner_id}
context_partner = context.copy()
if partner_id:
lang = res_partner.browse(cr, uid, partner_id).lang
context_partner.update( {'lang': lang, 'partner_id': partner_id} )
product = product_product.browse(cr, uid, product_id, context=context_partner)
name = product.name
if product.description_purchase:
@@ -926,7 +941,7 @@ class purchase_order_line(osv.osv):
qty = qty or 1.0
supplierinfo = False
for supplier in product.seller_ids:
if supplier.name.id == partner_id:
if partner_id and (supplier.name.id == partner_id):
supplierinfo = supplier
if supplierinfo.product_uom.id != uom_id:
res['warning'] = {'title': _('Warning!'), 'message': _('The selected supplier only sells this product by %s') % supplierinfo.product_uom.name }
@@ -940,8 +955,11 @@ class purchase_order_line(osv.osv):
res['value'].update({'date_planned': date_planned or dt, 'product_qty': qty})
# - determine price_unit and taxes_id
price = product_pricelist.price_get(cr, uid, [pricelist_id],
product.id, qty or 1.0, partner_id, {'uom': uom_id, 'date': date_order})[pricelist_id]
if pricelist_id:
price = product_pricelist.price_get(cr, uid, [pricelist_id],
product.id, qty or 1.0, partner_id or False, {'uom': uom_id, 'date': date_order})[pricelist_id]
else:
price = product.standard_price
taxes = account_tax.browse(cr, uid, map(lambda x: x.id, product.supplier_taxes_id))
fpos = fiscal_position_id and account_fiscal_position.browse(cr, uid, fiscal_position_id, context=context) or False
+4 -3
View File
@@ -226,6 +226,7 @@
<field name="partner_ref"/>
<field domain="[('type','=','purchase')]" name="pricelist_id" groups="product.group_purchase_pricelist" on_change="onchange_pricelist(pricelist_id, context)"/>
<field name="currency_id" invisible='1'/>
<field name="journal_id" invisible='1'/>
</group>
<group>
<field name="date_order"/>
@@ -451,7 +452,7 @@
<field name="name">purchase.order.line.tree</field>
<field name="model">purchase.order.line</field>
<field name="arch" type="xml">
<tree string="Purchase Order Lines">
<tree string="Purchase Order Lines" create="false">
<field name="order_id"/>
<field name="name"/>
<field name="partner_id" string="Supplier" />
@@ -471,11 +472,11 @@
<field name="model">purchase.order.line</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<form string="Purchase Order Line" version="7.0">
<form string="Purchase Order Line" version="7.0" create="false">
<sheet>
<label for="order_id" class="oe_edit_only"/>
<h1>
<field name="order_id" class="oe_inline"/>
<field name="order_id" class="oe_inline" domain="[('invoice_method','=','manual')]" />
<label string="," attrs="{'invisible':[('date_order','=',False)]}"/>
<field name="date_order" class="oe_inline"/>
</h1>
+2 -2
View File
@@ -18,7 +18,7 @@
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='date']" position="before">
<field name="purchase_id"/>
<field name="purchase_id" domain="[('invoice_method','=','picking')]" context="{'search_default_partner_id':partner_id,'default_partner_id':partner_id, 'default_invoice_method':'picking'}"/>
</xpath>
<xpath expr="//field[@name='company_id']" position="after">
<field name="warehouse_id" groups="stock.group_locations"/>
@@ -59,7 +59,7 @@
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="domain">[('type','=','in')]</field>
<field name="domain">[('type','=','in'),('purchase_id.invoice_method','=','picking')]</field>
<field name="context">{"default_type": "in", "contact_display": "partner_address", "search_default_done": 1, "search_default_to_invoice": 1}</field>
<field name="search_view_id" ref="stock.view_picking_in_search"/>
<field name="help" type="html">
@@ -8,7 +8,7 @@
<field name="inherit_id" ref="purchase.purchase_order_line_form"/>
<field name="arch" type="xml">
<field name="account_analytic_id" position="replace">
<field name="analytics_id" domain="[('plan_id','&lt;&gt;',False)]"/>
<field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','&lt;&gt;',False)]"/>
</field>
</field>
</record>
@@ -19,7 +19,7 @@
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<field name="account_analytic_id" position="replace">
<field name="analytics_id" domain="[('plan_id','&lt;&gt;',False)]"/>
<field name="analytics_id" context="{'journal_id':parent.journal_id}" domain="[('plan_id','&lt;&gt;',False)]"/>
</field>
</field>
</record>
+1
View File
@@ -948,6 +948,7 @@ class sale_order_line(osv.osv):
elif uom: # whether uos is set or not
default_uom = product_obj.uom_id and product_obj.uom_id.id
q = product_uom_obj._compute_qty(cr, uid, uom, qty, default_uom)
result['product_uom'] = default_uom
if product_obj.uos_id:
result['product_uos'] = product_obj.uos_id.id
result['product_uos_qty'] = qty * product_obj.uos_coeff
+1 -1
View File
@@ -373,7 +373,7 @@ class product_product(osv.osv):
"typed as 'internal'."),
'virtual_available': fields.function(_product_available, multi='qty_available',
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
string='Future Quantity',
string='Forecasted Quantity',
help="Forecast quantity (computed as Quantity On Hand "
"- Outgoing + Incoming)\n"
"In a context with a single Stock Location, this includes "
+1 -1
View File
@@ -219,7 +219,7 @@
</xpath>
<ul position="inside">
<li t-if="record.type.raw_value != 'service'">On hand: <field name="qty_available"/> <field name="uom_id"/></li>
<li t-if="record.type.raw_value != 'service'">Available: <field name="virtual_available"/> <field name="uom_id"/></li>
<li t-if="record.type.raw_value != 'service'">Forecasted: <field name="virtual_available"/> <field name="uom_id"/></li>
</ul>
</field>
</record>
+1 -1
View File
@@ -629,7 +629,7 @@ class stock_picking(osv.osv):
'name': fields.char('Reference', size=64, select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'origin': fields.char('Source Document', size=64, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Reference of the document", select=True),
'backorder_id': fields.many2one('stock.picking', 'Back Order of', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="If this shipment was split, then this field links to the shipment which contains the already processed part.", select=True),
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, readonly=True, help="Shipping type specify, goods coming in or going out."),
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], 'Shipping Type', required=True, select=True, help="Shipping type specify, goods coming in or going out."),
'note': fields.text('Notes', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'stock_journal_id': fields.many2one('stock.journal','Stock Journal', select=True, states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'location_id': fields.many2one('stock.location', 'Location', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}, help="Keep empty if you produce at the location where the finished products are needed." \
+5 -5
View File
@@ -540,7 +540,7 @@
</group>
<group string="Chained Locations">
<field name="chained_location_type"/>
<field name="chained_location_id" attrs="{'required':[('chained_location_type','=','fixed')]}"/>
<field name="chained_location_id" attrs="{'required':[('chained_location_type','=','fixed')],'invisible':[('chained_location_type','in',['none','customer'])]}"/>
<field name="chained_auto_packing"/>
<field name="chained_delay"/>
<field name="chained_journal_id"/>
@@ -551,9 +551,9 @@
<field name="posx"/>
<field name="posy"/>
<field name="posz"/>
</group><group string="Accounting Information">
<field name="valuation_in_account_id" attrs="{'readonly':[('usage','not in',('inventory','production'))]}"/>
<field name="valuation_out_account_id" attrs="{'readonly':[('usage','not in',('inventory','production'))]}"/>
</group><group string="Accounting Information" attrs="{'invisible':[('usage','not in',('inventory','production'))]}">
<field name="valuation_in_account_id"/>
<field name="valuation_out_account_id"/>
</group>
</group>
<separator string="Additional Information"/>
@@ -782,7 +782,7 @@
<group>
<group>
<field name="move_type"/>
<field name="type" groups="base.group_no_one"/>
<field name="type" invisible="1"/>
<field name="auto_picking" groups="base.group_user"/>
</group>
<group>
@@ -6,7 +6,7 @@
<field name="model">stock.fill.inventory</field>
<field name="arch" type="xml">
<form string="Import Inventory" version="7.0">
<separator string="Import current product inventory from the following location"/>
<separator string="Import the current inventory"/>
<group>
<field name="location_id" groups="stock.group_locations"/>
<field name="recursive" groups="stock.group_locations"/>
@@ -52,7 +52,6 @@ class action_traceability(osv.osv_memory):
value = {
'domain': "[('id','in',["+','.join(map(str, ids))+"])]",
'name': ((type1=='move_history_ids2') and _('Upstream Traceability')) or _('Downstream Traceability'),
'view_type': 'tree',
'view_mode': 'tree',
'res_model': 'stock.move',
'field_parent': type1,
-26
View File
@@ -1,26 +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 stock_planning
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-248
View File
@@ -1,248 +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/>.
#
##############################################################################
{
'name': 'Master Procurement Schedule',
'version': '1.2',
'author': 'OpenERP SA and Grzegorz Grzelak (OpenGLOBE)',
'category' : 'Manufacturing',
'images': ['images/master_procurement_schedule.jpeg','images/sales_forecast.jpeg','images/stock_planning_line.jpeg','images/stock_sales_period.jpeg'],
'depends': ['crm', 'stock','sale'],
'description': """
MPS allows to create a manual procurement plan apart of the normal MRP scheduling, which works automatically based on minimum stock rules.
==========================================================================================================================================
Quick Glossary:
---------------
- Stock Period - the time boundaries (between Start Date and End Date) for
your Sales and Stock forecasts and planning
- Sales Forecast - the quantity of products you plan to sell during the
related Stock Period.
- Stock Planning - the quantity of products you plan to purchase or produce
for the related Stock Period.
To avoid confusion with the terms used by the ``sale_forecast`` module,
('Sales Forecast' and 'Planning' are amounts) we use terms 'Stock and Sales
Forecast' and 'Stock Planning' to emphasize that we use quantity values.
Where to begin:
---------------
Using this module is done in three steps:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Create Stock Periods via the **Warehouse** > **Configuration** > **Stock Periods** menu
(Mandatory step)
* Create Sale Forecasts fill them with forecast quantities, via the
**Sales** > **Sales Forecast** menu. (Optional step but useful for further planning)
* Create the actual MPS plan, check the balance and trigger the procurements
as required. The actual procurement is the final step for the Stock Period.
Stock Period configuration:
---------------------------
You have two menu items for Periods in "**Warehouse** > **Configuration** > **Stock Periods**".
There are:
~~~~~~~~~~
* "Create Stock Periods" - can automatically creating daily, weekly or
monthly periods.
* 'Stock Periods' - allows to create any type of periods, change the dates
and change the state of period.
Creating periods is the first step. You can create custom periods using the 'New'
button in 'Stock Periods', but it is recommended to use the automatic assistant
'Create Stock Periods'.
Remarks:
++++++++
- These periods (Stock Periods) are completely distinct from Financial or
other periods in the system.
- Periods are not assigned to companies (when you use multicompany). Module
suppose that you use the same periods across companies. If you wish to use
different periods for different companies define them as you wish (they can
overlap). Later on in this text will be indications how to use such periods.
- When periods are created automatically their start and finish dates are with
start hour 00:00:00 and end hour 23:59:00. When you create daily periods they
will have start date 31.01.2010 00:00:00 and end date 31.01.2010 23:59:00.
It works only in automatic creation of periods. When you create periods
manually you have to take care about hours because you can have incorrect
values form sales or stock.
- If you use overlapping periods for the same product, warehouse and company
results can be unpredictable.
- If current date doesn't belong to any period or you have holes between
periods results can be unpredictable.
Sales Forecasts configuration:
------------------------------
You have few menus for Sales forecast in "**Sales** > **Sales Forecasts**":
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- "Create Sales Forecasts" - can automatically create forecast lines
according to your needs
- 'Sales Forecasts' - for managing the Sales forecasts
Menu 'Create Sales Forecasts' creates Forecasts for products from selected
Category, for selected Period and for selected Warehouse.
It is also possible to copy the previous forecast.
Remarks:
++++++++
- This tool doesn't duplicate lines if you already have an entry for the same
Product, Period, Warehouse, created or validated by the same user. If you
wish to create another forecast, if relevant lines exists you have to do it
manually as described below.
- When created lines are validated by someone else you can use this tool to
create another line for the same Period, Product and Warehouse.
- When you choose 'Copy Last Forecast', created line take quantity and other
settings from your (validated by you or created by you if not validated yet)
forecast which is for last period before period of created forecast.
On 'Sales Forecast' form mainly you have to enter a forecast quantity in
'Product Quantity'. Further calculation can work for draft forecasts. But
validation can save your data against any accidental changes. You can click
'Validate' button but it is not mandatory.
Instead of forecast quantity you may enter the amount of forecast sales via the
'Product Amount' field. The system will count quantity from amount according to
Sale price of the Product.
All values on the form are expressed in unit of measure selected on form. You can
select a unit of measure from the default category or from secondary category.
When you change unit of measure the forecast product quantity will be re-computed
according to new UoM.
To work out your Sale Forecast you can use the 'Sales History' of the product.
You have to enter parameters to the top and left of this table and system will
count sale quantities according to these parameters. So you can get results for
a given sales team or period.
MPS or Procurement Planning:
----------------------------
An MPS planning consists in Stock Planning lines, used to analyze and possibly
drive the procurement of products for each relevant Stock Period and Warehouse.
The menu is located in "**Warehouse** > **Schedulers** > **Master Procurement Schedule**":
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- "Create Stock Planning Lines" - a wizard to help automatically create many
planning lines
- 'Master Procurement Schedule' - management of your planning lines
Similarly to the way Sales forecast serves to define your sales planning, the MPS
lets you plan your procurements (Purchase/Manufacturing).You can quickly populate
the MPS with the 'Create Stock Planning Lines' wizard, and then proceed to review
them via the 'Master Procurement Schedule' menu.
The 'Create Stock Planning Lines' wizard lets you to quickly create all MPS lines
for a given Product Category, and a given Period and Warehouse.When you enable
the 'All Products with Forecast' option of the wizard, the system creates lines
for all products having sales forecast for selected Period and Warehouse (the
selected Category will be ignored in this case).
Under menu 'Master Procurement Schedule' you will usually change the 'Planned Out'
and 'Planned In' quantities and observe the resulting 'Stock Simulation' value
to decide if you need to procure more products for the given Period. 'Planned Out'
will be initially based on 'Warehouse Forecast' which is the sum of all outgoing
stock moves already planned for the Period and Warehouse. Of course you can alter
this value to provide your own quantities. It is not necessary to have any forecast.
'Planned In' quantity is used to calculate field 'Incoming Left' which is the
quantity to be procured to reach the 'Stock Simulation' at the end of Period. You
can compare 'Stock Simulation' quantity to minimum stock rules visible on the form.
And you can plan different quantity than in Minimum Stock Rules. Calculations are
done for whole Warehouse by default, if you want to see values for Stock location
of calculated warehouse you can check 'Stock Location Only'.
When you are satisfied with the 'Planned Out', 'Planned In' and end of period
'Stock Simulation', you can click on 'Procure Incoming Left' to create a
procurement for the 'Incoming Left' quantity. You can decide if procurement will
go to the to Stock or Input location of the Warehouse.
If you don't want to Produce or Buy the product but just transfer the calculated
quantity from another warehouse you can click 'Supply from Another Warehouse'
(instead of 'Procure Incoming Left') and the system will create the appropriate
picking list (stock moves). You can choose to take the goods from the Stock or
the Output location of the source warehouse. Destination location (Stock or Input)
in the destination warehouse will be taken as for the procurement case.
To see update the quantities of 'Confirmed In', 'Confirmed Out', 'Confirmed In
Before', 'Planned Out Before' and 'Stock Simulation' you can press 'Calculate
Planning'.
All values on the form are expressed in unit of measure selected on form. You can
select one of unit of measure from default category or from secondary category.
When you change unit of measure the editable quantities will be re-computed
according to new UoM. The others will be updated after pressing 'Calculate Planning'.
Computation of Stock Simulation quantities:
-------------------------------------------
The Stock Simulation value is the estimated stock quantity at the end of the
period. The calculation always starts with the real stock on hand at the beginning
of the current period, then adds or subtracts the computed quantities.
When you are in the same period (current period is the same as calculated) Stock Simulation is calculated as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Stock Simulation =** Stock of beginning of current Period - Planned Out + Planned In
When you calculate period next to current:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Stock Simulation =** Stock of beginning of current Period - Planned Out of current Period + Confirmed In of current Period (incl. Already In) - Planned Out of calculated Period + Planned In of calculated Period .
As you see the calculated Period is taken the same way as in previous case, but
the calculation in the current Period is a little bit different. First you should
note that system takes for only Confirmed moves for the current period. This means
that you should complete the planning and procurement of the current Period before
going to the next one.
When you plan for future Periods:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Stock Simulation =** Stock of beginning of current Period - Sum of Planned Out of Periods before calculated + Sum of Confirmed In of Periods before calculated (incl. Already In) - Planned Out of calculated Period + Planned In of calculated Period.
Here 'Periods before calculated' designates all periods starting with the current
until the period before the one being calculated.
Remarks:
++++++++
- Remember to make the proceed with the planning of each period in chronological
order, otherwise the numbers will not reflect the reality
- If you planned for future periods and find that real Confirmed Out is larger
than Planned Out in some periods before, you can repeat Planning and make
another procurement. You should do it in the same planning line. If you
create another planning line the suggestions can be wrong.
- When you wish to work with different periods for some products, define two
kinds of periods (e.g. Weekly and Monthly) and use them for different
products. Example: If you use always Weekly periods for Product A, and
Monthly periods for Product B all calculations will work correctly. You
can also use different kind of periods for the same product from different
warehouse or companies. But you cannot use overlapping periods for the same
product, warehouse and company because results can be unpredictable. The
same applies to Forecasts lines.
""",
'data': [
'security/stock_planning_security.xml',
'security/ir.model.access.csv',
'stock_planning_view.xml',
'wizard/stock_planning_create_periods_view.xml',
'wizard/stock_planning_forecast_view.xml',
'wizard/stock_planning_createlines_view.xml',
],
'test': ['test/stock_planning.yml'],
'auto_install': False,
'installable': True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More