Compare commits
41 Commits
8.0-purcha
...
8-sheet-wi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ba12b8812 | ||
|
|
c867b1d76f | ||
|
|
b41f188eb4 | ||
|
|
891c64bb1f | ||
|
|
b9e07ea986 | ||
|
|
12fbd5dc2c | ||
|
|
7948193fe0 | ||
|
|
64cb3d44ad | ||
|
|
08f434b6a0 | ||
|
|
6176b37fa6 | ||
|
|
4015f5b1c9 | ||
|
|
ef920f58f4 | ||
|
|
c108f617c2 | ||
|
|
4acce9509f | ||
|
|
e9ab3187e7 | ||
|
|
13e6facec5 | ||
|
|
6c53b3c1ae | ||
|
|
a379b59597 | ||
|
|
2f179995bf | ||
|
|
7c5f04a39e | ||
|
|
b814ec11bf | ||
|
|
7d39e50ba3 | ||
|
|
77995aa125 | ||
|
|
314350efee | ||
|
|
40ef119999 | ||
|
|
6583ea0cd9 | ||
|
|
7def6a85e4 | ||
|
|
618ad6d6d6 | ||
|
|
05c0f74420 | ||
|
|
78ff16436d | ||
|
|
b4dc9da272 | ||
|
|
3aa16cdacf | ||
|
|
d823e3ae75 | ||
|
|
a1f57e1ab5 | ||
|
|
c2d2e93f07 | ||
|
|
56bdeb3ee9 | ||
|
|
b811ae890a | ||
|
|
07a444367b | ||
|
|
9f331306af | ||
|
|
83bca9318d | ||
|
|
32e2ecea37 |
1
account_cutoff_accrual_picking_ods/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
24
account_cutoff_accrual_picking_ods/__openerp__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Cutoff Accrual Picking ODS',
|
||||
'version': '8.0.0.1.0',
|
||||
'category': 'Tools',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Adds an Aeroo ODS report on cutoff accrual',
|
||||
'description': """
|
||||
Account Cutoff Accrual Picking ODS
|
||||
==================================
|
||||
|
||||
This module will add an Aeroo ODS report on Accrued Revenue and Accrued Expense.
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': "Akretion",
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account_cutoff_accrual_picking', 'report_aeroo'],
|
||||
'data': ['report.xml'],
|
||||
'installable': True,
|
||||
}
|
||||
BIN
account_cutoff_accrual_picking_ods/cutoff_accrual.ods
Normal file
27
account_cutoff_accrual_picking_ods/report.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<record id="account_cutoff_accrual_picking_ods" model="ir.actions.report.xml">
|
||||
<field name="name">Cutoff Accrual ODS</field>
|
||||
<field name="model">account.cutoff</field>
|
||||
<field name="report_name">account.cutoff.accrual.picking.ods</field>
|
||||
<field name="report_type">aeroo</field>
|
||||
<field name="in_format">oo-ods</field>
|
||||
<field name="report_rml">account_cutoff_accrual_picking_ods/cutoff_accrual.ods</field>
|
||||
<field name="parser_state">default</field>
|
||||
<field name="tml_source">file</field>
|
||||
<field name="out_format" ref="report_aeroo.report_mimetypes_ods_ods"/>
|
||||
</record>
|
||||
|
||||
<record id="account_cutoff_accrual_picking_ods_button" model="ir.values">
|
||||
<field name="name">Cutoff Accrual ODS</field>
|
||||
<field name="model">account.cutoff</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.report.xml,%d'%account_cutoff_accrual_picking_ods"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
3
account_fiscal_position_payable_receivable/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_fiscal_position
|
||||
26
account_fiscal_position_payable_receivable/__openerp__.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Fiscal Position Payable Receivable',
|
||||
'version': '8.0.1.0.0',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Configure payable/receivable accounts on fiscal positions',
|
||||
'description': """
|
||||
Account Fiscal Position Payable Receivable
|
||||
==========================================
|
||||
|
||||
This module allows to configure a special *Partner Receivable Account* and a special *Partner Payable Account* on fiscal positions. This is used in the onchange of the fiscal position of partners.
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion <alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': "Akretion",
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['account'],
|
||||
'data': [
|
||||
'account_fiscal_position_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class AccountFiscalPosition(models.Model):
|
||||
_inherit = 'account.fiscal.position'
|
||||
|
||||
receivable_account_id = fields.Many2one(
|
||||
'account.account', string='Partner Receivable Account',
|
||||
company_dependent=True, domain=[('type', '=', 'receivable')])
|
||||
payable_account_id = fields.Many2one(
|
||||
'account.account', string='Partner Payable Account',
|
||||
company_dependent=True, domain=[('type', '=', 'payable')])
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
@api.onchange('property_account_position')
|
||||
def fiscal_position_receivable_payable_change(self):
|
||||
fp = self.property_account_position
|
||||
ipo = self.env['ir.property']
|
||||
if fp.receivable_account_id:
|
||||
self.property_account_receivable = fp.receivable_account_id
|
||||
else:
|
||||
self.property_account_receivable = ipo.get(
|
||||
'property_account_receivable', 'res.partner')
|
||||
if fp.payable_account_id:
|
||||
self.property_account_payable = fp.payable_account_id
|
||||
else:
|
||||
self.property_account_payable = ipo.get(
|
||||
'property_account_payable', 'res.partner')
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
© 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<record id="view_account_position_form" model="ir.ui.view">
|
||||
<field name="name">receivable_payable.fiscal_position_form</field>
|
||||
<field name="model">account.fiscal.position</field>
|
||||
<field name="inherit_id" ref="account.view_account_position_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='country_group_id']/.." position="after">
|
||||
<group string="Payable and Receivable Accounts"
|
||||
name="payable_receivable_account" col="4">
|
||||
<field name="receivable_account_id"/>
|
||||
<field name="payable_account_id"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
{
|
||||
'name': 'Account Usability',
|
||||
'version': '0.1',
|
||||
'version': '0.3',
|
||||
'category': 'Accounting & Finance',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'Small usability enhancements in account module',
|
||||
|
||||
@@ -43,16 +43,30 @@ class AccountInvoice(models.Model):
|
||||
fiscal_position = fields.Many2one(track_visibility='onchange')
|
||||
|
||||
@api.multi
|
||||
def action_move_create(self):
|
||||
today = fields.Date.context_today(self)
|
||||
for invoice in self:
|
||||
if invoice.date_invoice and invoice.date_invoice > today:
|
||||
raise UserError(_(
|
||||
"You cannot validate the invoice of '%s' "
|
||||
" with an invoice date (%s) in the future !") % (
|
||||
invoice.partner_id.name_get()[0][1],
|
||||
invoice.date_invoice))
|
||||
return super(AccountInvoice, self).action_move_create()
|
||||
def onchange_payment_term_date_invoice(self, payment_term_id, date_invoice):
|
||||
res = super(AccountInvoice, self).onchange_payment_term_date_invoice(
|
||||
payment_term_id, date_invoice)
|
||||
if res and isinstance(res, dict) and 'value' in res:
|
||||
res['value']['period_id'] = False
|
||||
return res
|
||||
|
||||
# I really hate to see a "/" in the 'name' field of the account.move.line
|
||||
# generated from customer invoices linked to the partners' account because:
|
||||
# 1) the label of an account move line is an important field, we can't
|
||||
# write a rubbish '/' in it !
|
||||
# 2) the 'name' field of the account.move.line is used in the overdue letter,
|
||||
# and '/' is not meaningful for our customer !
|
||||
@api.multi
|
||||
def action_number(self):
|
||||
res = super(AccountInvoice, self).action_number()
|
||||
for inv in self:
|
||||
self._cr.execute(
|
||||
"UPDATE account_move_line SET name= "
|
||||
"CASE WHEN name='/' THEN %s "
|
||||
"ELSE %s||' - '||name END "
|
||||
"WHERE move_id=%s", (inv.number, inv.number, inv.move_id.id))
|
||||
self.invalidate_cache()
|
||||
return res
|
||||
|
||||
|
||||
class AccountFiscalYear(models.Model):
|
||||
|
||||
@@ -132,6 +132,13 @@
|
||||
<field name="analytic_account_id" position="attributes">
|
||||
<attribute name="invisible"></attribute>
|
||||
</field>
|
||||
<field name="reconcile_ref" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="reconcile_ref" position="after">
|
||||
<field name="reconcile_id"/>
|
||||
<field name="reconcile_partial_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
17
account_usability/migrations/8.0.0.2/pre-migration.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
def migrate(cr, version):
|
||||
if not version:
|
||||
return
|
||||
|
||||
# cf the inherit of action_number() of account.invoice
|
||||
# in account_usability/account.py
|
||||
cr.execute(
|
||||
"UPDATE account_move_line SET name= "
|
||||
"CASE WHEN account_move_line.name='/' THEN account_move.name "
|
||||
"ELSE account_move.name||' - '||account_move_line.name END "
|
||||
"FROM account_move WHERE account_move_line.move_id = account_move.id "
|
||||
"AND account_move_line.journal_id in "
|
||||
"(SELECT id FROM account_journal WHERE type in ('sale', 'sale_refund'))")
|
||||
16
account_usability/migrations/8.0.0.3/pre-migration.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
def migrate(cr, version):
|
||||
if not version:
|
||||
return
|
||||
|
||||
# cf the inherit of action_number() of account.invoice
|
||||
# in account_usability/account.py
|
||||
cr.execute(
|
||||
"UPDATE account_move_line SET name=account_move.name "
|
||||
"FROM account_move WHERE account_move_line.move_id = account_move.id "
|
||||
"AND account_move_line.name='/' "
|
||||
"AND account_move_line.journal_id in "
|
||||
"(SELECT id FROM account_journal WHERE type in ('purchase', 'purchase_refund'))")
|
||||
BIN
account_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
base_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
3
crm_usability/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import wizard
|
||||
29
crm_usability/__openerp__.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (http://www.akretion.com)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
|
||||
{
|
||||
'name': 'CRM Usability',
|
||||
'version': '8.0.1.0.0',
|
||||
'category': 'Customer Relationship Management',
|
||||
'license': 'AGPL-3',
|
||||
'summary': 'CRM usability enhancements',
|
||||
'description': """
|
||||
CRM Usability
|
||||
=============
|
||||
|
||||
Some enhancements in the *Merge Partners* wizard:
|
||||
|
||||
* take into account the unaccent option of the server config file
|
||||
* add optional group by on 'customer' and 'supplier' (active by default)
|
||||
|
||||
This module has been written by Alexis de Lattre from Akretion
|
||||
<alexis.delattre@akretion.com>.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['crm'],
|
||||
'data': ['wizard/base_partner_merge_view.xml'],
|
||||
'installable': True,
|
||||
}
|
||||
BIN
crm_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
3
crm_usability/wizard/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import base_partner_merge
|
||||
29
crm_usability/wizard/base_partner_merge.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (http://www.akretion.com)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
|
||||
from openerp import models, fields, tools
|
||||
|
||||
|
||||
class MergePartnerAutomatic(models.TransientModel):
|
||||
_inherit = 'base.partner.merge.automatic.wizard'
|
||||
|
||||
group_by_customer = fields.Boolean('Customer', default=True)
|
||||
group_by_supplier = fields.Boolean('Supplier', default=True)
|
||||
|
||||
def _generate_query(self, fields, maximum_group=100):
|
||||
sql = super(MergePartnerAutomatic, self)._generate_query(
|
||||
fields, maximum_group=maximum_group)
|
||||
name_sql_original = 'lower(name)'
|
||||
if name_sql_original in sql:
|
||||
if tools.config.get('unaccent', False):
|
||||
sql = sql.replace(
|
||||
name_sql_original,
|
||||
"unaccent(lower(replace(name, ' ', '')))")
|
||||
else:
|
||||
sql = sql.replace(
|
||||
name_sql_original,
|
||||
"lower(replace(name, ' ', ''))")
|
||||
|
||||
return sql
|
||||
23
crm_usability/wizard/base_partner_merge_view.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="base_partner_merge_automatic_wizard_form" model="ir.ui.view">
|
||||
<field name="name">rvip.base.partner.merge.automatic.wizard.form</field>
|
||||
<field name="model">base.partner.merge.automatic.wizard</field>
|
||||
<field name="inherit_id" ref="crm.base_partner_merge_automatic_wizard_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="group_by_is_company" position="after">
|
||||
<field name="group_by_customer"/>
|
||||
<field name="group_by_supplier"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='partner_ids']/tree/field[@name='is_company']" position="after">
|
||||
<field name="customer"/>
|
||||
<field name="supplier"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
BIN
hr_expense_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
@@ -184,6 +184,9 @@ class HrHolidays(models.Model):
|
||||
|
||||
vacation_date_from = fields.Date(
|
||||
string='First Day of Vacation', track_visibility='onchange',
|
||||
readonly=True, states={
|
||||
'draft': [('readonly', False)],
|
||||
'confirm': [('readonly', False)]},
|
||||
help="Enter the first day of vacation. For example, if "
|
||||
"you leave one full calendar week, the first day of vacation "
|
||||
"is Monday morning (and not Friday of the week before)")
|
||||
@@ -191,11 +194,16 @@ class HrHolidays(models.Model):
|
||||
('morning', 'Morning'),
|
||||
('noon', 'Noon'),
|
||||
], string="Start of Vacation", track_visibility='onchange',
|
||||
default='morning',
|
||||
default='morning', readonly=True, states={
|
||||
'draft': [('readonly', False)],
|
||||
'confirm': [('readonly', False)]},
|
||||
help="For example, if you leave one full calendar week, "
|
||||
"the first day of vacation is Monday Morning")
|
||||
vacation_date_to = fields.Date(
|
||||
string='Last Day of Vacation', track_visibility='onchange',
|
||||
readonly=True, states={
|
||||
'draft': [('readonly', False)],
|
||||
'confirm': [('readonly', False)]},
|
||||
help="Enter the last day of vacation. For example, if you "
|
||||
"leave one full calendar week, the last day of vacation is "
|
||||
"Friday evening (and not Monday of the week after)")
|
||||
@@ -203,7 +211,9 @@ class HrHolidays(models.Model):
|
||||
('noon', 'Noon'),
|
||||
('evening', 'Evening'),
|
||||
], string="End of Vacation", track_visibility='onchange',
|
||||
default='evening',
|
||||
default='evening', readonly=True, states={
|
||||
'draft': [('readonly', False)],
|
||||
'confirm': [('readonly', False)]},
|
||||
help="For example, if you leave one full calendar week, "
|
||||
"the end of vacation is Friday Evening")
|
||||
current_leaves_taken = fields.Float(
|
||||
@@ -228,7 +238,8 @@ class HrHolidays(models.Model):
|
||||
# The 'name' field is displayed publicly in the calendar
|
||||
# So the label should not be 'Description' but 'Public Title'
|
||||
name = fields.Char(
|
||||
string='Public Title', help="Warning: this title is shown publicly in the "
|
||||
string='Public Title',
|
||||
help="Warning: this title is shown publicly in the "
|
||||
"calendar. Don't write private/personnal information in this field.")
|
||||
|
||||
@api.one
|
||||
@@ -381,6 +392,19 @@ class HrHolidays(models.Model):
|
||||
res = super(HrHolidays, self).holidays_validate()
|
||||
return res
|
||||
|
||||
@api.multi
|
||||
def holidays_refuse(self):
|
||||
for holi in self:
|
||||
if (
|
||||
holi.user_id == self.env.user and
|
||||
not self.pool['res.users'].has_group(
|
||||
self._cr, self._uid, 'base.group_hr_manager')):
|
||||
raise UserError(_(
|
||||
"You cannot refuse your own Leave or Allocation "
|
||||
"holiday request '%s'.")
|
||||
% holi.name)
|
||||
return super(HrHolidays, self).holidays_refuse()
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
_inherit = 'res.company'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="0">
|
||||
|
||||
<record id="ir_actions_server_hr_holidays_confirm_mail" model="ir.actions.server">
|
||||
<field name="name">Auto-email confirmed leave</field>
|
||||
@@ -59,6 +59,9 @@ if not object.no_email_notification:
|
||||
<field name="action_id" ref="ir_actions_server_hr_holidays_refuse_mail"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="email_template_hr_holidays" model="email.template">
|
||||
<field name="name">Holidays email template</field>
|
||||
<field name="model_id" ref="hr_holidays.model_hr_holidays"/>
|
||||
|
||||
@@ -1,23 +1,3 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# HR Usability module for Odoo
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import hr
|
||||
|
||||
46
hr_usability/hr.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# HR Usability module for Odoo
|
||||
# Copyright (C) 2016 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class HrEmployee(models.Model):
|
||||
_inherit = 'hr.employee'
|
||||
|
||||
country_id = fields.Many2one(track_visibility='onchange')
|
||||
birthday = fields.Date(track_visibility='onchange')
|
||||
ssnid = fields.Char(track_visibility='onchange')
|
||||
sinid = fields.Char(track_visibility='onchange')
|
||||
identification_id = fields.Char(track_visibility='onchange')
|
||||
otherid = fields.Char(track_visibility='onchange')
|
||||
gender = fields.Selection(track_visibility='onchange')
|
||||
marital = fields.Selection(track_visibility='onchange')
|
||||
department_id = fields.Many2one(track_visibility='onchange')
|
||||
address_id = fields.Many2one(track_visibility='onchange')
|
||||
address_home_id = fields.Many2one(track_visibility='onchange')
|
||||
work_phone = fields.Char(track_visibility='onchange')
|
||||
mobile_phone = fields.Char(track_visibility='onchange')
|
||||
work_email = fields.Char(track_visibility='onchange')
|
||||
parent_id = fields.Many2one(track_visibility='onchange')
|
||||
coach_id = fields.Many2one(track_visibility='onchange')
|
||||
job_id = fields.Many2one(track_visibility='onchange')
|
||||
passport_id = fields.Char(track_visibility='onchange')
|
||||
@@ -28,10 +28,10 @@ class ResLang(models.Model):
|
||||
|
||||
@api.v7
|
||||
def init(self, cr):
|
||||
narrow_no_break_space = u'\u202f'
|
||||
no_break_space = u'\u00A0'
|
||||
cr.execute(
|
||||
"UPDATE res_lang SET thousands_sep=%s, grouping='[3,0]' "
|
||||
"WHERE code='fr_FR'", (narrow_no_break_space, ))
|
||||
"WHERE code='fr_FR'", (no_break_space, ))
|
||||
cr.execute(
|
||||
"UPDATE res_lang SET grouping='[3,0]' WHERE code='en_US'")
|
||||
return True
|
||||
|
||||
BIN
mail_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
mrp_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
pos_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
procurement_suggest/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
@@ -41,6 +41,7 @@ class ProcurementSuggestionGenerate(models.TransientModel):
|
||||
location_id = fields.Many2one(
|
||||
'stock.location', string='Stock Location', required=True,
|
||||
default=lambda self: self.env.ref('stock.stock_location_stock'))
|
||||
# TODO This code must be fixed in case of multicompany project
|
||||
|
||||
@api.model
|
||||
def _compute_procurement_qty(self, orderpoint):
|
||||
|
||||
24
product_search_supplier_code/README.rst
Normal file
@@ -0,0 +1,24 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:alt: License
|
||||
|
||||
|
||||
Product search
|
||||
==============
|
||||
|
||||
This module allows to search product by its suppliers'code'.
|
||||
It also allow to search stock picking by its suppliers'code'.
|
||||
|
||||
|
||||
Setting
|
||||
=======
|
||||
|
||||
No setting required.
|
||||
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
* Florian da Costa <florian.dacosta@akretion.com>
|
||||
* Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
|
||||
22
product_search_supplier_code/__init__.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Stock Display Destination Move module for OpenERP
|
||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
||||
# @author Florian da Costa <florian.dacosta@akretion.com>
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
21
product_search_supplier_code/__openerp__.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2013-TODAY Akretion (http://www.akretion.com)
|
||||
# @author Florian da Costa <florian.dacosta@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
'name': 'Product Search Supplier Code',
|
||||
'version': '0.1',
|
||||
'category': 'Inventory, Logistic, Storage',
|
||||
'license': 'AGPL-3',
|
||||
'summary': "Allow to search product by its suppliers'code",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['product', 'stock'],
|
||||
'data': [
|
||||
'views/product_view.xml',
|
||||
'views/picking_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
23
product_search_supplier_code/i18n/fr.po
Normal file
@@ -0,0 +1,23 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * product_search_supplier_code
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 7.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2015-11-04 15:18+0000\n"
|
||||
"PO-Revision-Date: 2015-11-04 15:18+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: product_search_supplier_code
|
||||
#: view:product.product:0
|
||||
#: view:stock.picking.in:0
|
||||
msgid "Supplier Default Code"
|
||||
msgstr "Code Fournisseur"
|
||||
|
||||
17
product_search_supplier_code/views/picking_view.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="stock_picking_supplier_code_search" model="ir.ui.view">
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_internal_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="after">
|
||||
<field name="move_lines" string="Supplier Default Code"
|
||||
filter_domain="[('move_lines.product_id.seller_ids.product_code','ilike',self)]"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
17
product_search_supplier_code/views/product_view.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="product_custom_search_view" model="ir.ui.view">
|
||||
<field name="model">product.product</field>
|
||||
<field name="inherit_id" ref="product.product_search_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="after">
|
||||
<field name="seller_ids" string="Supplier Default Code"
|
||||
filter_domain="[('seller_ids.product_code','ilike',self)]" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
BIN
project_issue_extension/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
@@ -1,12 +0,0 @@
|
||||
diff --git a/addons/stock/procurement.py b/addons/stock/procurement.py
|
||||
index 7b067ed..98857e6 100644
|
||||
--- a/addons/stock/procurement.py
|
||||
+++ b/addons/stock/procurement.py
|
||||
@@ -342,6 +342,7 @@ class procurement_order(osv.osv):
|
||||
|
||||
procurement_obj = self.pool.get('procurement.order')
|
||||
dom = company_id and [('company_id', '=', company_id)] or []
|
||||
+ dom.append(('suggest', '=', False))
|
||||
orderpoint_ids = orderpoint_obj.search(cr, uid, dom)
|
||||
prev_ids = []
|
||||
while orderpoint_ids:
|
||||
@@ -20,10 +20,20 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class StockWarehouseOrderpoint(models.Model):
|
||||
_inherit = 'stock.warehouse.orderpoint'
|
||||
|
||||
suggest = fields.Boolean(string='Suggest', default=True)
|
||||
|
||||
|
||||
class ProcurementOrder(models.Model):
|
||||
_inherit = 'procurement.order'
|
||||
|
||||
@api.model
|
||||
def _product_virtual_get(self, order_point):
|
||||
if order_point.suggest:
|
||||
return None
|
||||
return super(ProcurementOrder, self)._product_virtual_get(order_point)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
from openerp import models, fields, api, _
|
||||
import openerp.addons.decimal_precision as dp
|
||||
from openerp.tools import float_compare
|
||||
from openerp.tools import float_compare, float_is_zero
|
||||
from openerp.exceptions import Warning
|
||||
import logging
|
||||
|
||||
@@ -363,21 +363,20 @@ class PurchaseSuggestPoCreate(models.TransientModel):
|
||||
# value = [(product1, qty1, uom1), (product2, qty2, uom2)]
|
||||
psuggest_ids = self.env.context.get('active_ids')
|
||||
location = False
|
||||
precision = self.env['decimal.precision'].precision_get(
|
||||
'Product Unit of Measure')
|
||||
for line in self.env['purchase.suggest'].browse(psuggest_ids):
|
||||
if not location:
|
||||
location = line.location_id
|
||||
if not line.qty_to_order:
|
||||
if float_is_zero(line.qty_to_order, precision_digits=precision):
|
||||
continue
|
||||
if not line.product_id.seller_id:
|
||||
raise Warning(_(
|
||||
"No supplier configured for product '%s'.")
|
||||
% line.product_id.name)
|
||||
if (line.seller_id, line.company_id) in po_to_create:
|
||||
po_to_create[(line.seller_id, line.company_id)].append(
|
||||
po_to_create.setdefault(
|
||||
(line.seller_id, line.company_id), []).append(
|
||||
(line.product_id, line.qty_to_order, line.uom_po_id))
|
||||
else:
|
||||
po_to_create[(line.seller_id, line.company_id)] = [
|
||||
(line.product_id, line.qty_to_order, line.uom_po_id)]
|
||||
if not po_to_create:
|
||||
raise Warning(_('No purchase orders created or updated'))
|
||||
po_ids = []
|
||||
@@ -389,9 +388,5 @@ class PurchaseSuggestPoCreate(models.TransientModel):
|
||||
|
||||
action = self.env['ir.actions.act_window'].for_xml_id(
|
||||
'purchase', 'purchase_rfq')
|
||||
action.update({
|
||||
'nodestroy': False,
|
||||
'target': 'current',
|
||||
'domain': [('id', 'in', po_ids)],
|
||||
})
|
||||
action['domain'] = [('id', 'in', po_ids)]
|
||||
return action
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
from . import purchase
|
||||
from . import supplierinfo
|
||||
|
||||
@@ -1,24 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Purchase Usability Extension module for OpenERP
|
||||
# Copyright (C) 2014 Akretion (http://www.akretion.com)
|
||||
# coding: utf-8
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
|
||||
{
|
||||
@@ -31,15 +14,19 @@
|
||||
Purchase Usability Extension
|
||||
============================
|
||||
|
||||
Display Invoices and Incoming Shipments on Purchase Order form view (in dedicated tabs).
|
||||
- Display Invoices and Incoming Shipments on Purchase Order form view
|
||||
(in dedicated tabs).
|
||||
- Add a dedicated menu and tree view to Product Supplier Info model.
|
||||
|
||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
|
||||
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com>
|
||||
for any help or question about this module.
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
'depends': ['purchase'],
|
||||
'data': [
|
||||
'purchase_view.xml',
|
||||
'supplierinfo_view.xml',
|
||||
],
|
||||
'active': False,
|
||||
}
|
||||
|
||||
123
purchase_usability_extension/i18n/fr.po
Normal file
@@ -0,0 +1,123 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * purchase_usability_extension
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-11-16 16:58+0000\n"
|
||||
"PO-Revision-Date: 2016-11-16 18:01+0100\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: fr\n"
|
||||
"X-Generator: Poedit 1.8.7.1\n"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Delay"
|
||||
msgstr "Delay"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "Deliveries"
|
||||
msgstr "Livraisons"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "Deliveries & Invoices"
|
||||
msgstr "Livraisons & Factures"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Delivery"
|
||||
msgstr "Livraison"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.view_purchase_order_filter
|
||||
msgid "Fully Received"
|
||||
msgstr "Complètement reçue"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Group by..."
|
||||
msgstr "Grouper par..."
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "Invoices"
|
||||
msgstr "Factures"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.view_purchase_order_filter
|
||||
msgid "Not Fully Received"
|
||||
msgstr "Pas Complètement Reçue"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "Other Information"
|
||||
msgstr "Autre information"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.model,name:purchase_usability_extension.model_res_partner
|
||||
msgid "Partner"
|
||||
msgstr "Partenaire"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Product"
|
||||
msgstr "Article :"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Product (code or name)"
|
||||
msgstr "Article (code ou nom)"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.ui.menu,name:purchase_usability_extension.product_supplierinfo_menu
|
||||
msgid "Product Supplier"
|
||||
msgstr "Article Fournisseur"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.actions.act_window,name:purchase_usability_extension.product_supplierinfo_action
|
||||
msgid "Product Supplier Info"
|
||||
msgstr "Product Supplier Info"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.model,name:purchase_usability_extension.model_purchase_order
|
||||
msgid "Purchase Order"
|
||||
msgstr "Commande d'Achat"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.model,name:purchase_usability_extension.model_purchase_order_line
|
||||
msgid "Purchase Order Line"
|
||||
msgstr "Ligne de commande d'achat"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Quantity"
|
||||
msgstr "Quantité"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: field:purchase.order.line,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr "Séquence"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Supplier"
|
||||
msgstr "Fournisseur"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_tree
|
||||
msgid "Supplier Code"
|
||||
msgstr "Code Fournisseur"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "selection"
|
||||
msgstr "sélection"
|
||||
@@ -0,0 +1,122 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * purchase_usability_extension
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-11-16 16:58+0000\n"
|
||||
"PO-Revision-Date: 2016-11-16 16:58+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Delay"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "Deliveries"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "Deliveries & Invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Delivery"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.view_purchase_order_filter
|
||||
msgid "Fully Received"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Group by..."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "Invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.view_purchase_order_filter
|
||||
msgid "Not Fully Received"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "Other Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.model,name:purchase_usability_extension.model_res_partner
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Product"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Product (code or name)"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.ui.menu,name:purchase_usability_extension.product_supplierinfo_menu
|
||||
msgid "Product Supplier"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.actions.act_window,name:purchase_usability_extension.product_supplierinfo_action
|
||||
msgid "Product Supplier Info"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.model,name:purchase_usability_extension.model_purchase_order
|
||||
msgid "Purchase Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: model:ir.model,name:purchase_usability_extension.model_purchase_order_line
|
||||
msgid "Purchase Order Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Quantity"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: field:purchase.order.line,sequence:0
|
||||
msgid "Sequence"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_filter
|
||||
msgid "Supplier"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:product.supplierinfo:purchase_usability_extension.product_supplierinfo_view_tree
|
||||
msgid "Supplier Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase_usability_extension
|
||||
#: view:purchase.order:purchase_usability_extension.purchase_order_form
|
||||
msgid "selection"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,24 +1,7 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# Purchase Usability Extension module for Odoo
|
||||
# coding: utf-8
|
||||
# Copyright (C) 2015 Akretion (http://www.akretion.com)
|
||||
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
@@ -68,5 +68,6 @@
|
||||
<field name="context">{'search_default_draft': True}</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
BIN
purchase_usability_extension/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
12
purchase_usability_extension/supplierinfo.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# coding: utf-8
|
||||
# © 2015 David BEAL @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openerp import models, fields
|
||||
|
||||
|
||||
class ProductSupplierinfo(models.Model):
|
||||
_inherit = 'product.supplierinfo'
|
||||
|
||||
supplier_is_company = fields.Boolean(
|
||||
comodel_name='res.partner', related='name.is_company')
|
||||
54
purchase_usability_extension/supplierinfo_view.xml
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="product_supplierinfo_view_tree" model="ir.ui.view">
|
||||
<field name="model">product.supplierinfo</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="product_name"/>
|
||||
<field name="product_code" string="Supplier Code"/>
|
||||
<field name="min_qty"/>
|
||||
<field name="delay"/>
|
||||
<field name="product_uom"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_supplierinfo_view_filter" model="ir.ui.view">
|
||||
<field name="model">product.supplierinfo</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Product">
|
||||
<field name="name" string="Product (code or name)"
|
||||
filter_domain="['|',('product_code','ilike',self),('product_name','ilike',self)]"/>
|
||||
<field name="name" string="Supplier" filter_domain="[('name','ilike',self)]"/>
|
||||
<filter name="supplier_not_company" string="Supplier is not a company" domain="[('supplier_is_company','=',False)]"/>
|
||||
<group expand='0' string='Group by...'>
|
||||
<filter string='Supplier' domain="[]" context="{'group_by' : 'name'}"/>
|
||||
<filter string='Quantity' domain="[]" context="{'group_by' : 'min_qty'}"/>
|
||||
<filter string='Delay' domain="[]" context="{'group_by' : 'delay'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_supplierinfo_action" model="ir.actions.act_window">
|
||||
<field name="name">Product Supplier Info</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.supplierinfo</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="product_supplierinfo_menu"
|
||||
name="Product Supplier"
|
||||
parent="purchase.menu_procurement_management_product"
|
||||
action="product_supplierinfo_action"
|
||||
sequence="50"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
BIN
sale_crm_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
55
sale_stock_usability/i18n/fr.po
Normal file
@@ -0,0 +1,55 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_stock_usability
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-07-13 12:36+0000\n"
|
||||
"PO-Revision-Date: 2016-07-13 14:37+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: fr\n"
|
||||
"X-Generator: Poedit 1.8.7.1\n"
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: view:sale.order:sale_stock_usability.view_order_form_inherit
|
||||
msgid "Delivery Orders"
|
||||
msgstr "Livraisons"
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: view:procurement.group:sale_stock_usability.procurement_group_form_view
|
||||
#: field:procurement.group,picking_ids:0
|
||||
msgid "Pickings"
|
||||
msgstr "Préparations"
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: model:ir.model,name:sale_stock_usability.model_procurement_group
|
||||
msgid "Procurement Requisition"
|
||||
msgstr "Demande d'approvisionnement"
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: view:procurement.group:sale_stock_usability.procurement_group_form_view
|
||||
#: field:procurement.group,sale_ids:0
|
||||
msgid "Sale Orders"
|
||||
msgstr "Sale Orders"
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: model:ir.model,name:sale_stock_usability.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "Bon de commande"
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: model:ir.model,name:sale_stock_usability.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr "Ligne de commandes de vente"
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: view:stock.picking:sale_stock_usability.view_picking_internal_search_inherit
|
||||
msgid "[('invoice_state', '=', '2binvoiced'), ('state', '=', 'done')]"
|
||||
msgstr "[('invoice_state', '=', '2binvoiced'), ('state', '=', 'done')]"
|
||||
54
sale_stock_usability/i18n/sale_stock_usability.pot
Normal file
@@ -0,0 +1,54 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_stock_usability
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-07-13 12:36+0000\n"
|
||||
"PO-Revision-Date: 2016-07-13 12:36+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: view:sale.order:sale_stock_usability.view_order_form_inherit
|
||||
msgid "Delivery Orders"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: view:procurement.group:sale_stock_usability.procurement_group_form_view
|
||||
#: field:procurement.group,picking_ids:0
|
||||
msgid "Pickings"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: model:ir.model,name:sale_stock_usability.model_procurement_group
|
||||
msgid "Procurement Requisition"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: view:procurement.group:sale_stock_usability.procurement_group_form_view
|
||||
#: field:procurement.group,sale_ids:0
|
||||
msgid "Sale Orders"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: model:ir.model,name:sale_stock_usability.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: model:ir.model,name:sale_stock_usability.model_sale_order_line
|
||||
msgid "Sales Order Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_stock_usability
|
||||
#: view:stock.picking:sale_stock_usability.view_picking_internal_search_inherit
|
||||
msgid "[('invoice_state', '=', '2binvoiced'), ('state', '=', 'done')]"
|
||||
msgstr ""
|
||||
|
||||
BIN
sale_stock_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
49
sale_usability_extension/i18n/fr.po
Normal file
@@ -0,0 +1,49 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_usability_extension
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-07-13 11:01+0000\n"
|
||||
"PO-Revision-Date: 2016-07-13 13:03+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: fr\n"
|
||||
"X-Generator: Poedit 1.8.7.1\n"
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: model:ir.model,name:sale_usability_extension.model_account_invoice_line
|
||||
msgid "Invoice Line"
|
||||
msgstr "Lignes de facture"
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: view:sale.order:sale_usability_extension.view_order_form
|
||||
msgid "Invoices"
|
||||
msgstr "Factures"
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: field:account.invoice.line,sale_line_ids:0
|
||||
msgid "Sale Order Lines"
|
||||
msgstr "Lignes de Vente"
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: model:ir.model,name:sale_usability_extension.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "Bon de commande"
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: view:sale.order:sale_usability_extension.view_order_tree
|
||||
#: view:sale.order:sale_usability_extension.view_quotation_tree
|
||||
msgid "Total Untaxed"
|
||||
msgstr "Total HT"
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: view:sale.order:sale_usability_extension.view_order_form
|
||||
msgid "selection"
|
||||
msgstr "selection"
|
||||
48
sale_usability_extension/i18n/sale_usability_extension.pot
Normal file
@@ -0,0 +1,48 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * sale_usability_extension
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-07-13 11:01+0000\n"
|
||||
"PO-Revision-Date: 2016-07-13 11:01+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: model:ir.model,name:sale_usability_extension.model_account_invoice_line
|
||||
msgid "Invoice Line"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: view:sale.order:sale_usability_extension.view_order_form
|
||||
msgid "Invoices"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: field:account.invoice.line,sale_line_ids:0
|
||||
msgid "Sale Order Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: model:ir.model,name:sale_usability_extension.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: view:sale.order:sale_usability_extension.view_order_tree
|
||||
#: view:sale.order:sale_usability_extension.view_quotation_tree
|
||||
msgid "Total Untaxed"
|
||||
msgstr ""
|
||||
|
||||
#. module: sale_usability_extension
|
||||
#: view:sale.order:sale_usability_extension.view_order_form
|
||||
msgid "selection"
|
||||
msgstr ""
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="group_id" position="before">
|
||||
<field name="origin" position="after">
|
||||
<field name="sale_id" readonly="1" attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}"/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
1
stock_picking_zip/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import stock
|
||||
26
stock_picking_zip/__openerp__.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# coding: utf-8
|
||||
# © 2016 David BEAL
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
'name': 'Stock Picking Zip',
|
||||
'summary': "Allow to group picking list by zip code",
|
||||
'version': '8.0.0.0.1',
|
||||
'category': 'stock',
|
||||
'author': 'Akretion',
|
||||
'description': """
|
||||
Allow to group picking list by zip code
|
||||
|
||||
|
||||
Author: David BEAL
|
||||
""",
|
||||
'depends': [
|
||||
'stock',
|
||||
],
|
||||
'website': 'http://www.akretion.com/',
|
||||
'data': [
|
||||
'stock_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'license': 'AGPL-3',
|
||||
}
|
||||
39
stock_picking_zip/i18n/fr.po
Normal file
@@ -0,0 +1,39 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_picking_zip
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-09-21 10:46+0000\n"
|
||||
"PO-Revision-Date: 2016-09-21 12:47+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: fr\n"
|
||||
"X-Generator: Poedit 1.8.7.1\n"
|
||||
|
||||
#. module: stock_picking_zip
|
||||
#: view:stock.picking:stock_picking_zip.view_picking_internal_search
|
||||
msgid "Group By"
|
||||
msgstr "Grouper par"
|
||||
|
||||
#. module: stock_picking_zip
|
||||
#: model:ir.model,name:stock_picking_zip.model_stock_picking
|
||||
msgid "Picking List"
|
||||
msgstr "Liste de livraison"
|
||||
|
||||
#. module: stock_picking_zip
|
||||
#: help:stock.picking,short_zip:0
|
||||
msgid "Troncated zip code to a limited chars number allowing group by"
|
||||
msgstr "Code postal tronqué permettant de faire des regroupements"
|
||||
|
||||
#. module: stock_picking_zip
|
||||
#: view:stock.picking:stock_picking_zip.view_picking_internal_search
|
||||
#: field:stock.picking,short_zip:0
|
||||
msgid "Zip"
|
||||
msgstr "Code Postal"
|
||||
38
stock_picking_zip/i18n/stock_picking_zip.pot
Normal file
@@ -0,0 +1,38 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_picking_zip
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-09-21 10:46+0000\n"
|
||||
"PO-Revision-Date: 2016-09-21 10:46+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: stock_picking_zip
|
||||
#: view:stock.picking:stock_picking_zip.view_picking_internal_search
|
||||
msgid "Group By"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_picking_zip
|
||||
#: model:ir.model,name:stock_picking_zip.model_stock_picking
|
||||
msgid "Picking List"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_picking_zip
|
||||
#: help:stock.picking,short_zip:0
|
||||
msgid "Troncated zip code to a limited chars number allowing group by"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_picking_zip
|
||||
#: view:stock.picking:stock_picking_zip.view_picking_internal_search
|
||||
#: field:stock.picking,short_zip:0
|
||||
msgid "Zip"
|
||||
msgstr ""
|
||||
|
||||
24
stock_picking_zip/stock.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# coding: utf-8
|
||||
# © 2016 David BEAL @ Akretion <david.beal@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class StockPicking(models.Model):
|
||||
_inherit = 'stock.picking'
|
||||
|
||||
short_zip = fields.Char(
|
||||
string='Zip', compute='_compute_short_zip', store=True,
|
||||
help="Troncated zip code to a limited chars number allowing group by")
|
||||
|
||||
def _set_short_zip_size(self):
|
||||
""" if zip is 69100, then short zip is 69 """
|
||||
return 2
|
||||
|
||||
@api.depends('partner_id')
|
||||
@api.multi
|
||||
def _compute_short_zip(self):
|
||||
for rec in self:
|
||||
if rec.partner_id and rec.partner_id.zip:
|
||||
rec.short_zip = rec.partner_id.zip[:self._set_short_zip_size()]
|
||||
30
stock_picking_zip/stock_view.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<record id="vpicktree" model="ir.ui.view">
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.vpicktree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="after">
|
||||
<field name="short_zip"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_picking_internal_search" model="ir.ui.view">
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_internal_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<group string="Group By" position="inside">
|
||||
<filter string="Zip" domain="[]" context="{'group_by':'short_zip'}"/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
258
stock_usability/i18n/fr.po
Normal file
@@ -0,0 +1,258 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_usability
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-11-11 20:54+0000\n"
|
||||
"PO-Revision-Date: 2016-11-11 21:56+0100\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: fr\n"
|
||||
"X-Generator: Poedit 1.8.7.1\n"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "\"{'group_by': 'min_date:day'}\""
|
||||
msgstr "\"{'group_by': 'min_date:day'}\""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.move:stock_usability.view_move_form
|
||||
#: view:stock.move:stock_usability.view_move_picking_form
|
||||
msgid "Advanced Parameters"
|
||||
msgstr "Paramètres Avancées"
|
||||
|
||||
#. module: stock_usability
|
||||
#: sql_constraint:stock.warehouse.orderpoint:0
|
||||
msgid "An orderpoint already exists for the same company, same warehouse, same stock location and same product."
|
||||
msgstr "An orderpoint already exists for the same company, same warehouse, same stock location and same product."
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,company_id:0
|
||||
msgid "Company"
|
||||
msgstr "Société"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,create_uid:0
|
||||
msgid "Created by"
|
||||
msgstr "Créé par"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,create_date:0
|
||||
msgid "Created on"
|
||||
msgstr "Créé le"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "Date Done"
|
||||
msgstr "Date Terminé"
|
||||
|
||||
#. module: stock_usability
|
||||
#: help:stock.quant,uom_id:0
|
||||
msgid "Default Unit of Measure used for all stock operation."
|
||||
msgstr "Default Unit of Measure used for all stock operation."
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,display_name:0
|
||||
msgid "Display Name"
|
||||
msgstr "Nom Affiché"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "Expected Date"
|
||||
msgstr "Date prévue"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.location:stock_usability.view_location_search
|
||||
msgid "Group By"
|
||||
msgstr "Groupé par"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,id:0
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_incoterms
|
||||
msgid "Incoterms"
|
||||
msgstr "Incoterms"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_inventory
|
||||
msgid "Inventory"
|
||||
msgstr "Inventaire"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_location
|
||||
msgid "Inventory Locations"
|
||||
msgstr "Emplacements de stock"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_location_route
|
||||
msgid "Inventory Routes"
|
||||
msgstr "Routes logistiques"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,__last_update:0
|
||||
msgid "Last Modified on"
|
||||
msgstr "Modifié le"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,write_uid:0
|
||||
msgid "Last Updated by"
|
||||
msgstr "Mis à jour par"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,write_date:0
|
||||
msgid "Last Updated on"
|
||||
msgstr "Modifié le"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.location:stock_usability.view_location_search
|
||||
msgid "Location Type"
|
||||
msgstr "Type d'Emplacement"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_procurement_scheduler_log
|
||||
msgid "Logs of the Procurement Scheduler"
|
||||
msgstr "Logs of the Procurement Scheduler"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_warehouse_orderpoint
|
||||
msgid "Minimum Inventory Rule"
|
||||
msgstr "Règle de stock minimum"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.move:stock_usability.view_move_form
|
||||
#: view:stock.move:stock_usability.view_move_picking_form
|
||||
msgid "Notes"
|
||||
msgstr "Notes"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "Origin"
|
||||
msgstr "Origine"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "Partner"
|
||||
msgstr "Partenaire"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_picking
|
||||
msgid "Picking List"
|
||||
msgstr "Liste de livraison"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.warehouse:stock_usability.view_warehouse
|
||||
msgid "Picking Types"
|
||||
msgstr "Types de préparation"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_procurement_order
|
||||
msgid "Procurement"
|
||||
msgstr "Approvisionnement"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree
|
||||
msgid "Procurement Scheduler Logs"
|
||||
msgstr "Procurement Scheduler Logs"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.actions.act_window,name:stock_usability.stock_location_path_action
|
||||
#: model:ir.ui.menu,name:stock_usability.stock_location_path_menu
|
||||
msgid "Push Rules"
|
||||
msgstr "Push Rules"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_quant
|
||||
msgid "Quants"
|
||||
msgstr "Quants"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:stock.location,quant_ids:0
|
||||
msgid "Related Quants"
|
||||
msgstr "Related Quants"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.warehouse:stock_usability.view_warehouse
|
||||
msgid "Routes"
|
||||
msgstr "Routes"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree
|
||||
msgid "Scheduler End Time"
|
||||
msgstr "Scheduler End Time"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree
|
||||
msgid "Scheduler Executed by"
|
||||
msgstr "Scheduler Executed by"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.actions.act_window,name:stock_usability.procurement_scheduler_log_action
|
||||
#: model:ir.ui.menu,name:stock_usability.procurement_scheduler_log_menu
|
||||
msgid "Scheduler Logs"
|
||||
msgstr "Scheduler Logs"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,start_datetime:0
|
||||
msgid "Start Date"
|
||||
msgstr "Date de Début"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_move
|
||||
msgid "Stock Move"
|
||||
msgstr "Mouvement de stock"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:procurement.order:stock_usability.view_procurement_form_stock_inherit
|
||||
msgid "Stock Moves"
|
||||
msgstr "Mouvements de stock"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:stock.move,product_supplier_code:0
|
||||
msgid "Supplier Code"
|
||||
msgstr "Code Fournisseur"
|
||||
|
||||
#. module: stock_usability
|
||||
#: help:stock.move,product_supplier_code:0
|
||||
msgid "Supplier product code if Partner is the supplier"
|
||||
msgstr "Code produit du fournisseur si le partenaire est le fournisseur"
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_picking_type
|
||||
msgid "The picking type determines the picking view"
|
||||
msgstr "Le type de préparation détermine la vue de préparation"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.transfer_details:stock_usability.view_stock_enter_transfer_details
|
||||
msgid "Total"
|
||||
msgstr "Total"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.quant:stock_usability.view_stock_quant_tree
|
||||
msgid "Total Qty"
|
||||
msgstr "Qté Total"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.stock_picking_graph
|
||||
msgid "Transfers"
|
||||
msgstr "Transferts"
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:stock.quant,uom_id:0
|
||||
msgid "Unit of Measure"
|
||||
msgstr "Unité de Mesure"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.move:stock_usability.view_move_form
|
||||
#: view:stock.move:stock_usability.view_move_picking_tree
|
||||
msgid "Unreserve"
|
||||
msgstr "Déréserver"
|
||||
257
stock_usability/i18n/stock_usability.pot
Normal file
@@ -0,0 +1,257 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_usability
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 8.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-11-11 20:54+0000\n"
|
||||
"PO-Revision-Date: 2016-11-11 20:54+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "\"{'group_by': 'min_date:day'}\""
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.move:stock_usability.view_move_form
|
||||
#: view:stock.move:stock_usability.view_move_picking_form
|
||||
msgid "Advanced Parameters"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: sql_constraint:stock.warehouse.orderpoint:0
|
||||
msgid "An orderpoint already exists for the same company, same warehouse, same stock location and same product."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,company_id:0
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,create_uid:0
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,create_date:0
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "Date Done"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: help:stock.quant,uom_id:0
|
||||
msgid "Default Unit of Measure used for all stock operation."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,display_name:0
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "Expected Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.location:stock_usability.view_location_search
|
||||
msgid "Group By"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,id:0
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_incoterms
|
||||
msgid "Incoterms"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_inventory
|
||||
msgid "Inventory"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_location
|
||||
msgid "Inventory Locations"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_location_route
|
||||
msgid "Inventory Routes"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,__last_update:0
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,write_uid:0
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,write_date:0
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.location:stock_usability.view_location_search
|
||||
msgid "Location Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_procurement_scheduler_log
|
||||
msgid "Logs of the Procurement Scheduler"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_warehouse_orderpoint
|
||||
msgid "Minimum Inventory Rule"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.move:stock_usability.view_move_form
|
||||
#: view:stock.move:stock_usability.view_move_picking_form
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "Origin"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.view_picking_internal_search
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_picking
|
||||
msgid "Picking List"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.warehouse:stock_usability.view_warehouse
|
||||
msgid "Picking Types"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_procurement_order
|
||||
msgid "Procurement"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree
|
||||
msgid "Procurement Scheduler Logs"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.actions.act_window,name:stock_usability.stock_location_path_action
|
||||
#: model:ir.ui.menu,name:stock_usability.stock_location_path_menu
|
||||
msgid "Push Rules"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_quant
|
||||
msgid "Quants"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:stock.location,quant_ids:0
|
||||
msgid "Related Quants"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.warehouse:stock_usability.view_warehouse
|
||||
msgid "Routes"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree
|
||||
msgid "Scheduler End Time"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree
|
||||
msgid "Scheduler Executed by"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.actions.act_window,name:stock_usability.procurement_scheduler_log_action
|
||||
#: model:ir.ui.menu,name:stock_usability.procurement_scheduler_log_menu
|
||||
msgid "Scheduler Logs"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:procurement.scheduler.log,start_datetime:0
|
||||
msgid "Start Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_move
|
||||
msgid "Stock Move"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:procurement.order:stock_usability.view_procurement_form_stock_inherit
|
||||
msgid "Stock Moves"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:stock.move,product_supplier_code:0
|
||||
msgid "Supplier Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: help:stock.move,product_supplier_code:0
|
||||
msgid "Supplier product code if Partner is the supplier"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: model:ir.model,name:stock_usability.model_stock_picking_type
|
||||
msgid "The picking type determines the picking view"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.transfer_details:stock_usability.view_stock_enter_transfer_details
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.quant:stock_usability.view_stock_quant_tree
|
||||
msgid "Total Qty"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.picking:stock_usability.stock_picking_graph
|
||||
msgid "Transfers"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: field:stock.quant,uom_id:0
|
||||
msgid "Unit of Measure"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_usability
|
||||
#: view:stock.move:stock_usability.view_move_form
|
||||
#: view:stock.move:stock_usability.view_move_picking_tree
|
||||
msgid "Unreserve"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_procurement_scheduler_log_full,Full access on procurement.scheduler.log to System group,model_procurement_scheduler_log,base.group_system,1,1,1,1
|
||||
access_procurement_scheduler_log_user,Read/Create procurement.scheduler.log to Stock user,model_procurement_scheduler_log,stock.group_stock_user,1,0,1,0
|
||||
access_procurement_scheduler_log_read,Read access on procurement.scheduler.log to Employee,model_procurement_scheduler_log,base.group_user,1,0,0,0
|
||||
|
||||
|
BIN
stock_usability/static/description/icon.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
@@ -20,7 +20,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields
|
||||
from openerp import models, fields, api
|
||||
import openerp.addons.decimal_precision as dp
|
||||
import logging
|
||||
|
||||
@@ -77,6 +77,11 @@ class StockWarehouseOrderpoint(models.Model):
|
||||
class StockMove(models.Model):
|
||||
_inherit = 'stock.move'
|
||||
|
||||
product_supplier_code = fields.Char(
|
||||
string='Supplier Code', compute='_compute_supplier_code',
|
||||
store=True, readonly=True,
|
||||
help="Supplier product code if Partner is the supplier")
|
||||
|
||||
# It seems that it is not necessary any more to
|
||||
# have the digits= on these 2 fields to fix the bug
|
||||
# https://github.com/odoo/odoo/pull/10038
|
||||
@@ -85,6 +90,17 @@ class StockMove(models.Model):
|
||||
# availability = fields.Float(
|
||||
# digits=dp.get_precision('Product Unit of Measure'))
|
||||
|
||||
@api.multi
|
||||
@api.depends('product_id', 'picking_id.partner_id')
|
||||
def _compute_supplier_code(self):
|
||||
for rec in self:
|
||||
supplier_code = False
|
||||
if rec.picking_id.partner_id and rec.product_id:
|
||||
for supplier_info in rec.product_id.seller_ids:
|
||||
if supplier_info.name == rec.picking_id.partner_id:
|
||||
supplier_code = supplier_info.product_code
|
||||
rec.product_supplier_code = supplier_code
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
'''name_get of stock_move is important for the reservation of the
|
||||
quants: so want to add the name of the customer and the expected date
|
||||
@@ -110,3 +126,14 @@ class StockQuant(models.Model):
|
||||
|
||||
uom_id = fields.Many2one(
|
||||
'product.uom', related='product_id.uom_id', readonly=True)
|
||||
|
||||
|
||||
class StockIncoterms(models.Model):
|
||||
_inherit = 'stock.incoterms'
|
||||
|
||||
@api.multi
|
||||
def name_get(self):
|
||||
res = []
|
||||
for inco in self:
|
||||
res.append((inco.id, u'[%s] %s' % (inco.code, inco.name)))
|
||||
return res
|
||||
|
||||
@@ -161,6 +161,9 @@
|
||||
icon="STOCK_UNDO" groups="stock.group_stock_user"
|
||||
states="confirmed,assigned"/>
|
||||
</field>
|
||||
<field name="product_id" position="after">
|
||||
<field name="product_supplier_code"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
74
web_sheet_width_custom/README.rst
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
|
||||
======================
|
||||
Web Sheet Width Custom
|
||||
======================
|
||||
|
||||
Allow to modify form width with a field selection in the form view.
|
||||
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
To configure this module, you need to:
|
||||
|
||||
#. Apply 'Technical Features' rights to your user
|
||||
|
||||
#. Go to the form view of your choice with the menu
|
||||
(Settings > Technical > User Interface > Views)
|
||||
|
||||
#. Apply a value in the 'Form Width' field.
|
||||
|
||||
.. figure:: web_sheet_width_custom/static/description/img1.png
|
||||
:alt: Set full width
|
||||
:width: 600 px
|
||||
|
||||
|
||||
|
||||
Install the 'web_sheet_full_width' module if you want to have a full screen
|
||||
behaviour in all sheets.
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, you need to configure the form view of your choice
|
||||
as explained above.
|
||||
|
||||
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
* add other css styles to have more choice on width.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/akretion/odoo-usability/issues>`_. In case of trouble, please
|
||||
check there if your issue has already been reported. If you spotted it first,
|
||||
help us smashing it by providing a detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Images
|
||||
------
|
||||
|
||||
Icon courtesy of http://www.picol.org/ (size_width.svg)
|
||||
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* David Béal <david.beal@akretion.com>
|
||||
|
||||
|
||||
Idea
|
||||
----
|
||||
|
||||
Idea comes from module web_sheet_full_width (Luc De Meyer)
|
||||
1
web_sheet_width_custom/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
20
web_sheet_width_custom/__openerp__.py
Executable file
@@ -0,0 +1,20 @@
|
||||
# coding: utf-8
|
||||
# © 2016 David BEAL @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
'name': 'Web Sheet width Custom',
|
||||
'summary': 'Choose a dedicated width for your form view',
|
||||
'version': '8.0.1.0.0',
|
||||
'license': 'AGPL-3',
|
||||
'author': 'Akretion',
|
||||
'category': 'web',
|
||||
'depends': [
|
||||
'web',
|
||||
],
|
||||
'data': [
|
||||
'views/sheet.xml',
|
||||
'views/ui_view.xml',
|
||||
],
|
||||
'installable': True,
|
||||
}
|
||||
1
web_sheet_width_custom/models/__init__.py
Executable file
@@ -0,0 +1 @@
|
||||
from . import model
|
||||
73
web_sheet_width_custom/models/model.py
Normal file
@@ -0,0 +1,73 @@
|
||||
# coding: utf-8
|
||||
# © 2016 David BEAL @ Akretion
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from lxml import etree
|
||||
|
||||
from openerp import models, api, fields
|
||||
from openerp.osv import orm
|
||||
from openerp import SUPERUSER_ID
|
||||
|
||||
|
||||
class IrUiView(models.Model):
|
||||
_inherit = 'ir.ui.view'
|
||||
|
||||
def _get_form_width(self):
|
||||
return [('oe_form_sheet_full_screen', 'Full Screen'), ]
|
||||
|
||||
form_width = fields.Selection(
|
||||
string='Form Width', selection='_get_form_width',
|
||||
help="Allow to set the form view to the max width "
|
||||
"to have a better usability on data entry")
|
||||
|
||||
|
||||
class ModelExtended(models.Model):
|
||||
_inherit = 'ir.model'
|
||||
|
||||
def _css_class_to_apply(self, node, css_class):
|
||||
""" Complete class if exist """
|
||||
existing_class = [
|
||||
x[1] for x in node.items()
|
||||
if x[0] == 'class']
|
||||
if existing_class:
|
||||
css_class = '%s %s' % (
|
||||
css_class, existing_class[0])
|
||||
return css_class
|
||||
|
||||
def _register_hook(self, cr, ids=None):
|
||||
|
||||
def make_fields_view_get():
|
||||
|
||||
@api.model
|
||||
def fields_view_get(self, view_id=None, view_type='form',
|
||||
toolbar=False, submenu=False):
|
||||
# Perform standard fields_view_get
|
||||
res = fields_view_get.origin(
|
||||
self, view_id=view_id, view_type=view_type,
|
||||
toolbar=toolbar, submenu=submenu)
|
||||
# customize xml output
|
||||
if view_type == 'form' and res.get('view_id'):
|
||||
view = self.env['ir.ui.view'].browse(res.get('view_id'))
|
||||
if view.form_width:
|
||||
model_m = self.env['ir.model']
|
||||
doc = etree.XML(res['arch'])
|
||||
node = doc.xpath('//sheet')
|
||||
if node:
|
||||
css_class = view.form_width
|
||||
for current_node in node:
|
||||
new_css = model_m._css_class_to_apply(
|
||||
current_node, css_class)
|
||||
current_node.set('class', new_css)
|
||||
orm.setup_modifiers(current_node)
|
||||
res['arch'] = etree.tostring(doc, pretty_print=True)
|
||||
return res
|
||||
|
||||
return fields_view_get
|
||||
|
||||
if ids is None:
|
||||
ids = self.search(cr, SUPERUSER_ID, [])
|
||||
for model in self.browse(cr, SUPERUSER_ID, ids):
|
||||
Model = self.pool.get(model.model)
|
||||
if Model:
|
||||
Model._patch_method('fields_view_get', make_fields_view_get())
|
||||
return super(ModelExtended, self)._register_hook(cr)
|
||||
BIN
web_sheet_width_custom/static/description/icon.png
Executable file
|
After Width: | Height: | Size: 411 B |
BIN
web_sheet_width_custom/static/description/img1.png
Normal file
|
After Width: | Height: | Size: 132 KiB |
4
web_sheet_width_custom/static/src/css/sheet.css
Executable file
@@ -0,0 +1,4 @@
|
||||
.openerp .oe_form_sheet_full_screen {
|
||||
max-width: none;
|
||||
margin: 0 auto;
|
||||
}
|
||||
12
web_sheet_width_custom/views/sheet.xml
Executable file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<template id="assets_backend" name="form_sheet_full_screen assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<link rel="stylesheet" href="/web_sheet_width_custom/static/src/css/sheet.css"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
17
web_sheet_width_custom/views/ui_view.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_view_form" model="ir.ui.view">
|
||||
<field name="model">ir.ui.view</field>
|
||||
<field name="inherit_id" ref="base.view_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="priority" position="after">
|
||||
<field name="form_width"
|
||||
attrs="{'invisible': [('type', '!=', 'form')]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||