Compare commits

..

23 Commits

Author SHA1 Message Date
Mourad Elhadj Mimoune
145ab11996 [FIX] regression on shortcut button on partner form view after PR #41 2017-10-10 17:35:32 +02:00
Alexis de Lattre
3888495071 Add field has_attachment on invoices 2017-09-29 14:36:57 +02:00
chafique delli
93acac8e19 Merge pull request #43 from akretion/8.0-mail-usability
add many2many_tags_email.js file for mail_usability that replaces addons-mail-fix.diff patch
2017-09-26 15:51:56 +02:00
Alexis de Lattre
44b32672e2 2 fixes in hr_holidays modules 2017-09-22 15:57:16 +02:00
Alexis de Lattre
1160cce1d8 Allow to duplicate an account move that belongs to a closed period => copy=False on period_id and date of account.move 2017-09-20 12:17:45 +02:00
chafique-delli
16664bcb7f add comment in many2many_tags_email.js file 2017-09-18 16:15:18 +02:00
chafique-delli
cfb92ec23a add many2many_tags_email.js file for mail_usability that replaces addons-mail-fix.diff patch 2017-09-18 15:44:58 +02:00
Sébastien BEAU
a3844004fb [FIX] fix showing all variant active or inactive 2017-09-16 12:28:22 +02:00
Alexis de Lattre
9319b120bf Add patch for odoo when using mail_usability 2017-09-14 17:46:05 +02:00
Alexis de Lattre
7fd5ab9cf1 Filter on period instead of dates for aged open invoices report 2017-09-12 10:35:39 +02:00
Alexis de Lattre
8f463db179 translation=False on 'name' of res.partner.category and crm.case.categ 2017-09-07 18:19:24 +02:00
Sébastien BEAU
f8720c7a36 [FIX] fix broken menu due to mistyping for context in reception menu 2017-08-17 10:27:30 +02:00
David Beal
e74e53c804 FIX make defaut module filter to installable 2017-08-16 12:43:41 +02:00
Sébastien BEAU
5388638941 [FIX] fix filtering partner on name and ref and not on email 2017-08-10 17:13:31 +02:00
mourad-ehm
d943ef262f Merge pull request #41 from akretion/fix_change_button_name_bug
[FIX] change button name bug
2017-08-04 14:49:13 +02:00
Sébastien BEAU
a787e092ed [IMP] add delivery usability 2017-08-03 20:30:44 +02:00
Sébastien BEAU
8e5f0b0afa [IMP] add type to be easier to customise button in custom module 2017-08-03 20:27:39 +02:00
Sébastien BEAU
cb21028a48 [IMP] add stock split menu 2017-08-03 14:32:53 +02:00
Sébastien BEAU
ffa6e74a19 [IMP] order invoice per date, solve issue with multi journal 2017-08-02 19:39:33 +02:00
Alexis de Lattre
1e062af883 Add wizard to mark all invoices as sent and add filter on invoices to send 2017-07-25 18:12:05 +02:00
Alexis de Lattre
31f191aecb Disable the constraint _check_account_type() on account.account, as agreed with Sebastien 2017-07-25 11:38:03 +02:00
Alexis de Lattre
51c982bf2f Fiscal value cols now have to right sign, to use with the updated version of l10n_fr_intrastat_product 2017-07-24 14:02:07 +02:00
Mourad Elhadj Mimoune
3d7241407e [FIX] Button name change bug 2017-07-11 15:32:07 +02:00
130 changed files with 571 additions and 132 deletions

View File

@@ -25,5 +25,5 @@ This module has been written by Alexis de Lattre from Akretion
'data': [
'analytic_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -45,5 +45,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_bank_statement_import'],
'data': ['account_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -42,5 +42,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_credit_control', 'partner_aged_open_invoices'],
'data': ['account_credit_control_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -20,5 +20,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_cutoff_accrual_picking', 'report_aeroo'],
'data': ['report.xml'],
'installable': False,
'installable': True,
}

View File

@@ -39,5 +39,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_cutoff_prepaid', 'report_aeroo'],
'data': ['report.xml'],
'installable': False,
'installable': True,
}

View File

@@ -43,5 +43,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_banking_sepa_direct_debit', 'account_payment_partner'],
'data': [],
'installable': False,
'installable': True,
}

View File

@@ -22,5 +22,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'data': [
'account_fiscal_position_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -39,5 +39,5 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'website': 'http://www.akretion.com',
'depends': ['account'],
'data': [],
'installable': False,
'installable': True,
}

View File

@@ -26,5 +26,5 @@ This module has been written by Alexis de Lattre from Akretion
'website': 'http://www.akretion.com',
'depends': ['account', 'base_usability'],
'data': ['account_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -40,5 +40,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['account'],
'installable': False,
'installable': True,
}

View File

@@ -39,5 +39,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account'],
'data': ['account_invoice_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -39,5 +39,5 @@ This module has been written by Alexis de Lattre from Akretion
'data': [
'account_invoice_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -37,5 +37,5 @@ This module has been written by Alexis de Lattre from Akretion
'website': 'http://www.akretion.com',
'depends': ['account_invoice_margin', 'bi_invoice_company_currency'],
'data': [],
'installable': False,
'installable': True,
}

View File

@@ -39,5 +39,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account'],
'data': ['company_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -36,7 +36,7 @@ Adds a function field named *picking_ids_label* on invoices. This field contains
'website': 'http://www.akretion.com/',
'depends': ['stock_account'],
'data': [],
'installable': False,
'installable': True,
'active': False,
}

View File

@@ -41,6 +41,6 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'website': 'http://www.akretion.com',
'depends': ['sale'],
'data': ['account_invoice_view.xml'],
'installable': False,
'installable': True,
'active': False,
}

View File

@@ -30,5 +30,5 @@ This module adds a button *Update Invoice* on Customer and Supplier invoices in
'wizard/account_invoice_update_view.xml',
'views/account_invoice.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -39,5 +39,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_usability'],
'data': ['wizard/account_move_line_filter_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -40,5 +40,5 @@ This module has been written by Alexis de Lattre from Akretion
'website': 'http://www.akretion.com/',
'depends': ['account_cutoff_prepaid', 'account_move_line_report_xls'],
'data': [],
'installable': False,
'installable': True,
}

View File

@@ -37,5 +37,4 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'author': 'Akretion',
'depends': ['account_payment'],
'data': ['payment_view.xml'],
'installable': False,
}

View File

@@ -40,5 +40,4 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'payment_view.xml',
],
'active': False,
'installable': False,
}

View File

@@ -42,5 +42,4 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'security/ir.model.access.csv',
],
'active': False,
'installable': False,
}

View File

@@ -1,3 +1,4 @@
# -*- encoding: utf-8 -*-
from . import account
from . import wizard

View File

@@ -49,6 +49,9 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account'],
'conflicts': ['account_invoice_overdue_filter'],
'data': ['account_view.xml'],
'installable': False,
'data': [
'account_view.xml',
'wizard/account_invoice_mark_sent_view.xml',
],
'installable': True,
}

View File

@@ -29,6 +29,7 @@ logger = logging.getLogger(__name__)
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
_order = "date_invoice desc, number desc, id desc"
origin = fields.Char(track_visibility='onchange')
supplier_invoice_number = fields.Char(track_visibility='onchange')
@@ -43,6 +44,37 @@ class AccountInvoice(models.Model):
journal_id = fields.Many2one(track_visibility='onchange')
partner_bank_id = fields.Many2one(track_visibility='onchange')
fiscal_position = fields.Many2one(track_visibility='onchange')
# has_attachment is useful for those who use attachment to archive
# supplier invoices. It allows them to find supplier invoices
# that don't have any attachment
has_attachment = fields.Boolean(
compute='_compute_has_attachment',
search='_search_has_attachment', readonly=True)
@api.multi
def _compute_has_attachment(self):
iao = self.env['ir.attachment']
for inv in self:
if iao.search([
('res_model', '=', 'account.invoice'),
('res_id', '=', inv.id),
('type', '=', 'binary'),
('company_id', '=', inv.company_id.id)], limit=1):
inv.has_attachment = True
else:
inv.has_attachment = False
def _search_has_attachment(self, operator, value):
att_inv_ids = {}
if operator == '=':
search_res = self.env['ir.attachment'].search_read([
('res_model', '=', 'account.invoice'),
('type', '=', 'binary'),
('res_id', '!=', False)], ['res_id'])
for att in search_res:
att_inv_ids[att['res_id']] = True
res = [('id', value and 'in' or 'not in', att_inv_ids.keys())]
return res
@api.multi
def onchange_payment_term_date_invoice(
@@ -130,6 +162,21 @@ class AccountAccount(models.Model):
else:
return super(AccountAccount, self).name_get()
def _check_account_type(self, cr, uid, ids, context=None):
'''Disable this native python constraint, because we want to be able
to configure payable/receivable accounts with an account type
with close_method == 'balance' in order to have opening entries with
fewer lines. It is not a problem because we always use
account_financial_report_webkit which doesn't take the detailed
opening entries into account.'''
return True
_constraints = [
# The method name must be exactly the same as the native
# method, in order to override it
(_check_account_type, 'No error message', ['user_type', 'type']),
]
@api.model
def check_account_hierarchy(self):
'''designed to be called by a script'''
@@ -183,6 +230,10 @@ class AccountMove(models.Model):
# update account_move set ref=left(ref,32) where ref is not null;
# update account_move_line set ref=left(ref,32) where ref is not null;
# Allow to duplicate an account.move that belongs to a closed period
period_id = fields.Many2one(copy=False)
date = fields.Date(copy=False)
@api.onchange('date')
def date_onchange(self):
if self.date:

View File

@@ -38,6 +38,11 @@
<field name="period_id" position="attributes">
<attribute name="groups"></attribute>
</field>
<!-- move sent field and make it visible -->
<field name="sent" position="replace"/>
<field name="move_id" position="after">
<field name="sent"/>
</field>
</field>
</record>
@@ -61,6 +66,11 @@
<filter name="unpaid" position="after">
<filter name="overdue" string="Overdue"
domain="[('state', '=', 'open'), ('date_due', '&lt;', current_date)]"/>
<separator/>
<filter name="to_send" string="To Send" domain="[('sent', '=', False), ('state', 'in', ('open', 'paid'))]"/>
<filter name="sent" string="Sent" domain="[('sent', '=', True)]"/>
<separator/>
<filter name="no_attachment" string="Missing Attachment" domain="[('has_attachment', '=', False)]"/>
</filter>
</field>
</record>
@@ -180,10 +190,24 @@ module -->
<!-- model account.move.line / Journal Items -->
<record id="account.action_account_moves_all_a" model="ir.actions.act_window">
<field name="limit">200</field>
<!-- add graph -->
<field name="view_mode">tree_account_move_line_quickadd,form,graph</field>
<!-- Win space, because there are already many columns -->
<field name="context">{'journal_show_code_only': True}</field>
</record>
<record id="account_move_line_graph" model="ir.ui.view">
<field name="name">usability.account.move.line.graph</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.account_move_line_graph"/>
<field name="arch" type="xml">
<graph position="attributes">
<!-- pivot by default instead of bar -->
<attribute name="type">pivot</attribute>
</graph>
</field>
</record>
<!-- model account.move / Journal Entries -->
<record id="account.action_move_journal_line" model="ir.actions.act_window">
<field name="limit">200</field>
@@ -285,6 +309,12 @@ module -->
<field name="inherit_id" ref="account.partner_view_button_journal_item_count"/>
<field name="arch" type="xml">
<button name="%(account.action_account_moves_all_tree)d" position="after">
<button name="show_receivable_account" type="object"
attrs="{'invisible': [('customer', '=', False)]}"
icon="fa-list" class="oe_stat_button">
<field string="Journal Items" name="journal_item_count"
widget="statinfo"/>
</button>
<button name="show_payable_account" type="object"
attrs="{'invisible': [('supplier', '=', False)]}"
icon="fa-list" class="oe_stat_button">
@@ -293,9 +323,7 @@ module -->
</button>
</button>
<button name="%(account.action_account_moves_all_tree)d" position="attributes">
<attribute name="type">object</attribute>
<attribute name="name">show_receivable_account</attribute>
<attribute name="attrs">{'invisible': [('customer', '=', False)]}</attribute>
<attribute name="invisible">True</attribute>
</button>
<field name="journal_item_count" position="attributes">
<attribute name="string">Receivable Account</attribute>

View File

@@ -0,0 +1,3 @@
# -*- encoding: utf-8 -*-
from . import account_invoice_mark_sent

View File

@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, api
import logging
logger = logging.getLogger(__name__)
class AccountInvoiceMarkSent(models.TransientModel):
_name = 'account.invoice.mark.sent'
_description = 'Mark invoices as sent'
@api.multi
def run(self):
assert self.env.context.get('active_model') == 'account.invoice',\
'Source model must be invoices'
assert self.env.context.get('active_ids'), 'No invoices selected'
invoices = self.env['account.invoice'].browse(
self.env.context.get('active_ids'))
invoices.write({'sent': True})
logger.info('Marking invoices with ID %s as sent', invoices.ids)
return

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<record id="account_invoice_mark_sent_form" model="ir.ui.view">
<field name="name">account.invoice.mark.sent.form</field>
<field name="model">account.invoice.mark.sent</field>
<field name="arch" type="xml">
<form string="Mark invoices as sent">
<p>
This wizard will mark as sent all the selected invoices.
</p>
<footer>
<button type="object" name="run" string="Mark as Sent" class="oe_highlight"/>
<button special="cancel" string="Cancel" class="oe_link"/>
</footer>
</form>
</field>
</record>
<act_window id="account_invoice_mark_sent_action"
multi="True"
key2="client_action_multi"
name="Mark as Sent"
res_model="account.invoice.mark.sent"
src_model="account.invoice"
view_mode="form"
target="new" />
</data>
</openerp>

View File

@@ -39,5 +39,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_voucher'],
'data': [],
'installable': False,
'installable': True,
}

View File

@@ -48,5 +48,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'report_aeroo',
'base_other_report_engines',
],
'installable': False,
'installable': True,
}

View File

@@ -21,5 +21,5 @@ Contributors: David BEAL
'data': [
'view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -41,5 +41,5 @@ This module adds 2 fields on the Company :
'website': 'http://www.akretion.com',
'depends': ['base'],
'data': ['company_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -39,5 +39,5 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'website': 'http://www.akretion.com',
'depends': ['base'],
'data': [],
'installable': False,
'installable': True,
}

View File

@@ -37,6 +37,6 @@ By default, you can't enter several addresses for an individual in OpenERP becau
'website': 'http://www.akretion.com',
'depends': ['base'],
'data': ['partner_view.xml'],
'installable': False,
'installable': True,
'active': False,
}

View File

@@ -53,5 +53,5 @@ A group by 'State' is added to module search view.
'module_view.xml',
'translation_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -12,6 +12,9 @@
<field name="model">ir.module.module</field>
<field name="inherit_id" ref="base.view_module_filter"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='extra']" position="after">
<filter name="installable" string="Installable" domain="[('state', '!=', 'uninstallable')]"/>
</xpath>
<xpath expr="//filter[@string='Category']" position="after">
<filter string="State" domain="[]" context="{'group_by':'state'}"/>
</xpath>
@@ -20,7 +23,7 @@
<record id="base.open_module_tree" model="ir.actions.act_window">
<field name="res_model">ir.module.module</field>
<field name="context">{}</field>
<field name="context">{'search_default_installable': 1}</field>
</record>
</data>

View File

@@ -60,3 +60,21 @@ class Partner(models.Model):
else:
name_title = ' '.join([title, name_title])
self.name_title = name_title
@api.model
def name_search(self, name, args=None, operator='ilike', limit=100):
if args is None:
args = []
if name:
# only filter on name and ref not in email
args += [
'|', ('display_name', 'ilike', name), ('ref', 'ilike', name)]
res = super(Partner, self).name_search(
name, args=args, operator=operator, limit=limit)
return [(pid, val.replace('\n', ' ')) for pid, val in res]
class ResPartnerCategory(models.Model):
_inherit = 'res.partner.category'
name = fields.Char(translate=False)

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from . import wizard
from . import crm

View File

@@ -31,5 +31,5 @@ This module has been written by Alexis de Lattre from Akretion
'wizard/base_partner_merge_view.xml',
'security/rule.xml',
],
'installable': False,
'installable': True,
}

12
crm_usability/crm.py Normal file
View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# © 2017 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
class CrmCaseCateg(models.Model):
_inherit = 'crm.case.categ'
name = fields.Char(translate=False)

View File

@@ -39,5 +39,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['delivery'],
'data': [],
'installable': False,
'installable': True,
}

View File

@@ -0,0 +1 @@
# -*- coding: utf-8 -*-

View File

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Akretion (http://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Delivery usability",
"summary": "Delivery Usability",
"version": "8.0.1.0.0",
"category": "Warehouse",
"website": "www.akretion.com",
"author": " Akretion",
"license": "AGPL-3",
"application": False,
"installable": True,
"external_dependencies": {
"python": [],
"bin": [],
},
"depends": [
"delivery",
],
"data": [
"views/stock_picking_view.xml",
],
"demo": [
],
"qweb": [
]
}

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_picking_withcarrier_out_form" model="ir.ui.view">
<field name="model">stock.picking</field>
<field name="inherit_id" ref="delivery.view_picking_withcarrier_out_form"/>
<field name="priority" eval="100"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='carrier_id']/.." position="replace">
</xpath>
<field name="backorder_id" position="after">
<field name="carrier_id"/>
<field name="carrier_tracking_ref"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@@ -23,7 +23,7 @@
{
'name': 'Eradicate Quick Create',
'version': '9.0.1.0.0',
'version': '0.1',
'category': 'Tools',
'license': 'AGPL-3',
'summary': 'Disable quick create on all objects',
@@ -39,5 +39,4 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'website': 'http://www.akretion.com',
'depends': ['base_optional_quick_create'],
'data': [],
'installable': True,
}

View File

@@ -34,5 +34,5 @@
'data': [
'security/expense_security.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -24,5 +24,5 @@
'hr_holidays_view.xml',
'wizard/hr_holidays_post_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -16,5 +16,5 @@
'data': [
'company_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -5,6 +5,7 @@
from openerp import models, fields, api, _
from openerp.exceptions import Warning as UserError
from openerp.tools import float_is_zero
class LunchVoucherPurchase(models.TransientModel):
@@ -15,6 +16,8 @@ class LunchVoucherPurchase(models.TransientModel):
self.ensure_one()
action = super(LunchVoucherPurchase, self).run()
company = self.env.user.company_id
# force_company to read standard_price properly
company = company.with_context(force_company=company.id)
lvao = self.env['lunch.voucher.attribution']
assert self._context.get('active_model')\
== 'lunch.voucher.attribution', 'wrong source model'
@@ -37,10 +40,18 @@ class LunchVoucherPurchase(models.TransientModel):
"Natixis Delivery Code on company '%s' should "
"have 7 characters/digits.")
% (company.lunch_voucher_natixis_delivery_code, company.name))
if not company.lunch_voucher_employer_price:
if float_is_zero(
company.lunch_voucher_employer_price,
precision_digits=2):
raise UserError(_(
"Lunch Voucher Employer Price not set on company '%s'.")
% company.name)
if float_is_zero(
company.lunch_voucher_product_id.standard_price,
precision_digits=2):
raise UserError(_(
"Lunch Voucher Standard Price is not set on product '%s'.")
% company.lunch_voucher_product_id.display_name)
lvouchers = lvao.browse(self._context['active_ids'])
of = u''
tmp = {}

View File

@@ -42,5 +42,5 @@
'security/holiday_security.xml',
'security/ir.model.access.csv',
],
'installable': False,
'installable': True,
}

View File

@@ -74,9 +74,11 @@ class HrHolidaysPost(models.TransientModel):
# because, after the write, it doesn't have a value any more !!!
holidays_to_post = self.holidays_to_post_ids
today = fields.Date.context_today(self)
if not self.holidays_to_post_ids:
raise Warning(
_('No leave request to post.'))
# Disable the raise below to make the module "hr_holidays_lunch_voucher"
# work even when nobody took holidays on the current month
# if not self.holidays_to_post_ids:
# raise Warning(
# _('No leave request to post.'))
self.holidays_to_post_ids.write({'posted_date': today})
view_id = self.env.ref('hr_holidays_usability.hr_holiday_graph').id
action = {

View File

@@ -41,5 +41,5 @@ This module has been developped by Alexis de Lattre <alexis.delattre@akretion.co
'data': [
'hr_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -42,5 +42,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'depends': ['intrastat_product', 'l10n_fr_intrastat_service'],
'data': ['product_view.xml'],
'post_init_hook': 'set_intrastat_type_on_products',
'installable': False,
'installable': True,
}

View File

@@ -46,5 +46,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'author': "Akretion",
'website': 'http://www.akretion.com',
'depends': ['base'],
'installable': False,
'installable': True,
}

View File

@@ -39,5 +39,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['l10n_fr_intrastat_product', 'report_aeroo'],
'data': ['report.xml'],
'installable': False,
'installable': True,
}

View File

@@ -40,5 +40,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['l10n_fr'],
'data': [],
'installable': False,
'installable': True,
}

View File

@@ -42,6 +42,6 @@ Small usability improvements on mails:
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['mail'],
'data': [],
'installable': False,
'data': ['views/mail.xml'],
'installable': True,
}

View File

@@ -0,0 +1,92 @@
openerp_FieldMany2ManyTagsEmail = function(instance) {
var _t = instance.web._t;
/**
* Extend of FieldMany2ManyTags widget method.
* When the user add a partner and the partner don't have an email, open a popup to purpose to add an email.
* The user can choose to add an email or cancel and close the popup.
*/
instance.web.form.FieldMany2ManyTagsEmail = instance.web.form.FieldMany2ManyTags.extend({
start: function() {
this.mutex = new openerp.Mutex();
// This widget will indirectly trigger a change:value to it's parent widget
// when setting the value of valid partners. For this reason we have to keep an
// internal state of the last value in order to compute the effective value changes.
this.last_processed_value = [];
this.on("change:value", this, this.on_change_value_check);
// Restore pop-up when trying to send to a partner without email
this.on_change_value_check();
this._super.apply(this, arguments);
},
on_change_value_check : function () {
var self = this;
var values = this.get('value').slice(0); // Clone the array
// We only validate partners emails in case the value is not empty
// and is different from the last processed value
var effective_change = _.difference(values, self.last_processed_value).length;
if (values.length && effective_change) {
this.mutex.exec(function() {
return self._check_email_popup(values);
});
}
},
_check_email_popup: function (ids) {
var self = this;
var valid_partners;
new instance.web.Model('res.partner').call("search", [[
["id", "in", ids],
["email", "=", false],
["notify_email", "in", ['always', 'all_except_notification']]]],
{context: this.build_context()})
.then(function (record_ids) {
var popups_deferreds = [];
self.valid_partners = _.difference(ids, record_ids);
// Propose the user to correct invalid partners
_.each(record_ids, function (id) {
var popup_def = $.Deferred();
popups_deferreds.push(popup_def);
var pop = new instance.web.form.FormOpenPopup(self);
pop.show_element(
'res.partner',
id,
self.build_context(),
{
title: _t("Please complete partner's informations and Email"),
}
);
pop.on('write_completed', self, function () {
self.valid_partners.push(id);
});
pop.on('closed', self, function () {
popup_def.resolve();
});
});
return $.when.apply($, popups_deferreds).then(function() {
// All popups have been processed for the given ids
// It is now time to set the final value with valid partners ids.
var filtered_value = _.uniq(self.valid_partners);
self.last_processed_value = filtered_value;
self.set({'value': filtered_value});
});
});
},
});
/**
* Registry of form fields
*/
instance.web.form.widgets = instance.web.form.widgets.extend({
'many2many_tags_email' : 'instance.web.form.FieldMany2ManyTagsEmail',
});
};

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="assets_backend" name="mail usability assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/mail_usability/static/src/js/many2many_tags_email.js"></script>
</xpath>
</template>
</data>
</openerp>

View File

@@ -25,5 +25,5 @@ Contributors: David BEAL
'data': [
'view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -47,6 +47,6 @@ with https://github.com/akretion/csv2xml4odoo
'misc_data.xml',
'ir_exports_line_data.xml',
],
'installable': False,
'installable': True,
'license': 'AGPL-3',
}

View File

@@ -43,5 +43,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['mrp'],
'data': ['mrp_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -41,5 +41,4 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['account_financial_report_webkit'],
'data': ['partner_view.xml'],
'installable': False,
}

View File

@@ -40,31 +40,27 @@ class ResPartner(models.Model):
def open_aged_open_invoices_report(self):
aoiwo = self.env['aged.open.invoices.webkit']
afo = self.env['account.fiscalyear']
# Force 'date_from' to the first day of the company's life
# in order to get the full picture of the partner's account
# (we could also do that via a filter by period, but, in this case,
# account_financial_report_webkit doesn't accept "until_date = today" ;
# until_date has to be the end date of the last period
# Filter by period (and not by date) to get
# the report à nouveau
fy_years = afo.search([], order='date_start')
date_from = fy_years[0].date_start
fy_id = aoiwo._get_fiscalyear()
filter_change = aoiwo.onchange_filter(
filter='filter_date', fiscalyear_id=fy_id)
filter='filter_period', fiscalyear_id=fy_id)
vals = {
'fiscalyear_id': fy_id,
'filter': 'filter_date',
'filter': 'filter_period',
'partner_ids': [(6, 0, [self.commercial_partner_id.id])],
'target_move': 'all',
}
vals.update(filter_change['value'])
vals['date_from'] = date_from
wizard = aoiwo.create(vals)
data = {'form': {
'chart_account_id': wizard.chart_account_id.id,
'filter': vals['filter'],
'date_from': vals['date_from'],
'date_to': vals['date_to'],
'period_to': False,
'period_from': vals['period_from'],
'period_to': vals['period_to'],
'date_to': False,
'fiscalyear_id': vals['fiscalyear_id'],
'partner_ids': vals['partner_ids'][0][2],
'target_move': vals['target_move'],

View File

@@ -43,5 +43,5 @@ This module has been written by Alexis de Lattre from Akretion
'depends': ['product'],
'conflicts': ['partner_products_shortcut'],
'data': ['partner_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -43,5 +43,5 @@ This module has been written by Alexis de Lattre from Akretion
'depends': ['product'],
'conflicts': ['partner_product_variants_shortcut'],
'data': ['partner_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -18,5 +18,5 @@ Search view improved: filter on postal code, city, mail, phone, etc...
'data': [
'partner_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -14,10 +14,20 @@
<field name="phone" string="Phones"
filter_domain="['|', ('phone', 'like', self), ('mobile', 'like', self)]"/>
</field>
<!-- Display the real field names of the search -->
<!-- We split the search of name, ref / email in two
as searching in email can return a lot of unwanted result
for exemple when you sell on marketplace and search for a customer
amazon you will have all customer that have bought throught the marketplace -->
<field name="name" position="attributes">
<attribute name="string">Name, Ref, Email</attribute>
<attribute name="string">Name, Ref</attribute>
<attribute name="filter_domain">['|', ('display_name','ilike',self), ('ref','=',self)]</attribute>
</field>
<field name="name" position="after">
<field name="email"/>
</field>
</field>
</record>

View File

@@ -13,7 +13,7 @@
"author": " Akretion",
"license": "AGPL-3",
"application": False,
"installable": False,
"installable": True,
"external_dependencies": {
"python": [],
"bin": [],

View File

@@ -37,5 +37,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['asterisk_click2dial', 'report_aeroo'],
'data': ['report.xml'],
'installable': False,
'installable': True,
}

View File

@@ -42,5 +42,5 @@ This module has been written by Alexis de Lattre
'website': 'http://www.akretion.com',
'depends': ['point_of_sale'],
'data': ['pos_journal_sequence_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -40,5 +40,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'depends': ['point_of_sale', 'pos_usability'],
# pos_usability is required to have the filter available_in_pos
'data': ['view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -42,5 +42,5 @@ This module has been written by Alexis de Lattre
'product_view.xml',
'security/ir.model.access.csv',
],
'installable': False,
'installable': True,
}

View File

@@ -41,5 +41,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['product'],
'data': ['product_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -41,5 +41,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'website': 'http://www.akretion.com',
'depends': ['point_of_sale'],
'data': ['pos_view.xml'],
'installable': False,
'installable': True,
}

View File

@@ -42,5 +42,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'stock_view.xml',
'wizard/procurement_suggest_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -41,5 +41,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'data': [
'wizard/procurement_suggest_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -41,5 +41,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'data': [
'procurement_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -33,5 +33,5 @@
'depends': ['account'],
'data': ['product_view.xml'],
'demo': [],
'installable': False,
'installable': True,
}

View File

@@ -30,5 +30,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'stock_view.xml',
'product_removal_data.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -47,6 +47,6 @@ with https://github.com/akretion/csv2xml4odoo
'misc_data.xml',
'ir_exports_line_data.xml',
],
'installable': False,
'installable': True,
'license': 'AGPL-3',
}

View File

@@ -43,5 +43,4 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'security/ir.model.access.csv',
],
'active': False,
'installable': False,
}

View File

@@ -42,5 +42,4 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'security/ir.model.access.csv',
],
'active': False,
'installable': False,
}

View File

@@ -37,5 +37,4 @@ And it reduces the start time of the Point of Sale !
'author': 'Akretion',
'website': 'http://www.akretion.com',
'depends': ['product'],
'installable': False,
}

View File

@@ -2,9 +2,9 @@
<openerp>
<data>
<record id="product_supplier_code_search_view" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_search_view"/>
<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"

View File

@@ -12,7 +12,7 @@
"author": " Akretion",
"license": "AGPL-3",
"application": False,
"installable": False,
"installable": True,
"external_dependencies": {
"python": [],
"bin": [],

View File

@@ -9,7 +9,7 @@
'website': 'http://akretion.com',
'author': 'Akretion',
'license': 'AGPL-3',
'installable': False,
'installable': True,
'depends': [
'sale',
'purchase',

View File

@@ -48,5 +48,5 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
'security/product_security.xml',
'product_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -37,5 +37,4 @@ This module has been written by Alexis de Lattre from Akretion
'website': 'http://www.akretion.com',
'depends': ['product'],
'data': ['product_view.xml'],
'installable': False,
}

View File

@@ -1 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View File

@@ -12,7 +12,7 @@
"author": " Akretion",
"license": "AGPL-3",
"application": False,
"installable": False,
"installable": True,
"external_dependencies": {
"python": [],
"bin": [],

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import product

View File

@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Akretion (http://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import fields, models
class ProductTemplate(models.Model):
_inherit = 'product.template'
all_product_variant_ids = fields.One2many(
'product.product',
'product_tmpl_id',
'All Product Variant',
domain=['|', ('active', '=', False), ('active', '=', True)])

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="product_template_view_form" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="priority" eval="64"/>
<field name="arch" type="xml">
<field name="attribute_line_ids" position="after">
<field name="product_variant_ids" nolabel="1" domain="['|', ('active', '=', False), ('active', '=', True)]" required="0">
<field name="all_product_variant_ids" nolabel="1" required="0">
<tree create="0">
<field name="default_code"/>
<field name="attribute_value_ids" widget="many2many_tags"/>
@@ -20,7 +20,7 @@
icon="gtk-stop"/>
<button type="object"
name="button_deactivate"
attrs="{'invisible': [('active','=',False)]}"
attrs="{'invisible': [('active','=',False)]}"
icon="gtk-apply"/>
</tree>
</field>

View File

@@ -49,5 +49,4 @@ Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for
'project_data.xml',
],
'active': False,
'installable': False,
}

View File

@@ -42,5 +42,5 @@ This module has been written by Alexis de Lattre from Akretion
'website': 'http://www.akretion.com',
'depends': ['purchase'],
'data': [],
'installable': False,
'installable': True,
}

View File

@@ -43,5 +43,5 @@ This module has been written by Alexis de Lattre from Akretion
'wizard/purchase_date_planned_update_view.xml',
'purchase_view.xml',
],
'installable': False,
'installable': True,
}

View File

@@ -12,7 +12,7 @@
'author': 'Akretion, Odoo Community Association (OCA)',
'license': 'AGPL-3',
'application': False,
'installable': False,
'installable': True,
'depends': [
'purchase',
],

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