New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMP] point_of_sale: extension point xml rendering #26363
[IMP] point_of_sale: extension point xml rendering #26363
Conversation
Note: Unfortunately, the diff is uglier than it needs to be... |
462627f
to
3822a73
Compare
3822a73
to
dcb73a5
Compare
dcb73a5
to
11118c2
Compare
11118c2
to
c332e52
Compare
c332e52
to
fa43ec6
Compare
@switch87 Could you have a kind look at this? The problem it solves is to be able to manipulate the receipt environment before passing it to the header and footer rendering, so that header and footer can make use of an custom extended environment. This enables client-by-client customization in an extended (legal) receipt environment. EDIT: This equivalent gist looks nicer than the PR diff, see this line for what it does in reality. |
Will do! 👍 |
FYI, what I actually do: _export_for_printing: function(){
var _super = order_model_super._export_for_printing.apply(this, arguments);
var company = this.pos.company;
var client = this.get('client');
_super.company = _.extend(_super.company, {
legalname: company.l10n_co_oficial_name,
fiscal_regime: company.l10n_co_regimen_char,
vat: company.vat_formatted,
economic_activity: company.l10n_co_economic_activity_id,
});
if (!!client) {
_super.client = {
name: client.name,
legalname: client.l10n_co_oficial_name,
vat: client.vat_formatted,
vat_label: company.country && company.country.vat_label || '',
};
}
return _super;
} |
It will have to wait until next year. |
Happy new year! I've no hurry, I'm maintaining a patched Odoo for the many reasons I sporadically try to push one or the other PR. If it will be included in master, I'm more than happy on the long run... |
81e5668
to
fa43ec6
Compare
fa43ec6
to
ae9abd6
Compare
ae9abd6
to
27a56d0
Compare
0affe7c
to
83ce43b
Compare
83ce43b
to
5bf2ed7
Compare
@switch87 Could you give this a go once again? It would be nice, could this be merged... |
5bf2ed7
to
719d29e
Compare
719d29e
to
cc77a80
Compare
cc77a80
to
eb23231
Compare
@switch87 Shall we? 😉 |
@pimodoo I think this would be an improvement. What do you think? |
eb23231
to
ae00f7b
Compare
Before, extending the xml rendering environment was a matter of overriding the whole method. This commit enables a clean extenstion point to alter the rendering dict in the mean time till a thourough refactoring in the near future according to the new js guidlines.
ae00f7b
to
9278cfa
Compare
Is this still relevant? |
Before, extending the xml rendering environment was a matter of overriding the
whole method.
This commit enables a clean extenstion point to alter the rendering dict in
the mean time till a thourough refactoring in the near future according to the
new js guidlines.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
Note: Please do not close, even if not immediately accepted (
wishlist
tag). This PR is meant to be carried along and actively maintained, until this semantic will be completed this way or another.--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
@xoe-labs